diff options
author | KHobbits <rob@khobbits.co.uk> | 2013-01-08 23:59:31 +0000 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2013-01-08 23:59:31 +0000 |
commit | c54d68a6603c42949e71e9ad3506bdd2926b3f4c (patch) | |
tree | dbd0f1ca03b7912cfd5cd8267bf50af1f44ab540 | |
parent | 33d31231049a7d4a49d01b9efaf91f871f9389cf (diff) | |
download | Essentials-c54d68a6603c42949e71e9ad3506bdd2926b3f4c.tar Essentials-c54d68a6603c42949e71e9ad3506bdd2926b3f4c.tar.gz Essentials-c54d68a6603c42949e71e9ad3506bdd2926b3f4c.tar.lz Essentials-c54d68a6603c42949e71e9ad3506bdd2926b3f4c.tar.xz Essentials-c54d68a6603c42949e71e9ad3506bdd2926b3f4c.zip |
Cleanup
-rw-r--r-- | Essentials/src/com/earth2me/essentials/ItemDb.java | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/Essentials/src/com/earth2me/essentials/ItemDb.java b/Essentials/src/com/earth2me/essentials/ItemDb.java index 5886b5607..85753e816 100644 --- a/Essentials/src/com/earth2me/essentials/ItemDb.java +++ b/Essentials/src/com/earth2me/essentials/ItemDb.java @@ -176,19 +176,14 @@ public class ItemDb implements IConf, IItemDb { if (stack.getType().equals(Material.ENCHANTED_BOOK)) { - EnchantmentStorageMeta meta = (EnchantmentStorageMeta)stack.getItemMeta(); - if (level == 0) { -// if (meta.hasStoredEnchant(enchantment)) -// { - meta.removeStoredEnchant(enchantment); -// } + meta.removeStoredEnchant(enchantment); } else { - meta.addStoredEnchant(enchantment, level, allowUnsafe); + meta.addStoredEnchant(enchantment, level, allowUnsafe); } stack.setItemMeta(meta); } @@ -208,7 +203,6 @@ public class ItemDb implements IConf, IItemDb { stack.addEnchantment(enchantment, level); } - } } } |