diff --git a/BankEconomyMod/src/me/kaZep/Base/PlayerBuffData.java b/BankEconomyMod/src/me/kaZep/Base/PlayerBuffData.java index 8ec42b2..cc0906a 100644 --- a/BankEconomyMod/src/me/kaZep/Base/PlayerBuffData.java +++ b/BankEconomyMod/src/me/kaZep/Base/PlayerBuffData.java @@ -33,12 +33,12 @@ public class PlayerBuffData { public String toString() { //A method that outputs this class as a string. - return ((java.lang.Object)this).toString()+"{p = "+p.toString()+", base_spdlv = "+base_spdlv+", base_armorlv = "+base_armorlv+", armorbufflist = "+ - armorbufflist.toString()+", base_hplv = "+base_hplv+", hpbufflist = "+hpbufflist.toString()+", helmet_durability = "+ - helmet_durability+", chestplate_durability = "+chestplate_durability+", leggings_durability = "+leggings_durability+"," + + return "PlayerBuffData@{p = "+((p!=null)?p.toString():"null")+", base_spdlv = "+base_spdlv+", base_armorlv = "+base_armorlv+", armorbufflist = "+ + ((armorbufflist!=null)?armorbufflist.toString():"null")+", base_hplv = "+base_hplv+", hpbufflist = "+((hpbufflist!=null)?hpbufflist.toString():"null")+", helmet_durability = "+ + helmet_durability+", chestplate_durability = "+chestplate_durability+", leggings_durability = "+leggings_durability+"," + " boots_durability = "+boots_durability+", potion_spdlv = "+potion_spdlv+", potion_time = "+potion_time+", hpbuff_time = "+ hpbuff_time+", extra_hp = "+extra_hp+", money_gained = "+money_gained+", last_money_report_time = "+last_money_report_time+"," + - "plugin = "+plugin.toString()+"}"; + "plugin = "+((plugin!=null)?plugin.toString():"null")+"}"; } public String healthbar(double curHP,double maxHP) { diff --git a/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java b/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java index 2c98614..89d0c52 100644 --- a/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java +++ b/BankEconomyMod/src/me/kaZep/Base/PlayerListener.java @@ -4101,14 +4101,26 @@ implements Listener } if (result.getResult().getType()==Material.WOOL && result.getResult().getAmount() == 1) { - result.setResult(new ItemStack(Material.AIR)); - return; + //Make sure the crafting matrix only contains three string. + int stringcount=0; + for (int i=0;i