From 6cc24971826ebfcab430f50eb8017ff40d2209b2 Mon Sep 17 00:00:00 2001 From: GJ Date: Thu, 14 Feb 2013 16:29:49 -0500 Subject: [PATCH] THis wasn't removing when it should have. --- src/main/java/com/gmail/nossr50/listeners/PlayerListener.java | 2 +- .../java/com/gmail/nossr50/skills/utilities/SkillTools.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java index dd807f454..63817e756 100644 --- a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java @@ -92,7 +92,7 @@ public class PlayerListener implements Listener { if (itemLore.remove("mcMMO Ability Tool")) { if (efficiencyLevel <= 5) { - item.removeEnchantment(Enchantment.DIG_SPEED); + itemMeta.removeEnchant(Enchantment.DIG_SPEED); } else { itemMeta.addEnchant(Enchantment.DIG_SPEED, efficiencyLevel - 5, true); diff --git a/src/main/java/com/gmail/nossr50/skills/utilities/SkillTools.java b/src/main/java/com/gmail/nossr50/skills/utilities/SkillTools.java index b0a3a4079..e4ad6186e 100644 --- a/src/main/java/com/gmail/nossr50/skills/utilities/SkillTools.java +++ b/src/main/java/com/gmail/nossr50/skills/utilities/SkillTools.java @@ -559,7 +559,7 @@ public class SkillTools { if (itemLore.remove("mcMMO Ability Tool")) { if (efficiencyLevel <= 5) { - item.removeEnchantment(Enchantment.DIG_SPEED); + itemMeta.removeEnchant(Enchantment.DIG_SPEED); } else { itemMeta.addEnchant(Enchantment.DIG_SPEED, efficiencyLevel - 5, true);