From c890ff5605de3cee6ad97d92c8e83baa44209848 Mon Sep 17 00:00:00 2001 From: NuclearW Date: Tue, 22 May 2012 05:18:08 -0400 Subject: [PATCH] Use new system! --- .../gmail/nossr50/listeners/PlayerListener.java | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java index d14373525..bc63e5592 100644 --- a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java @@ -214,18 +214,8 @@ public class PlayerListener implements Listener { /* REPAIR CHECKS */ if (Permissions.getInstance().repair(player) && block.getTypeId() == Config.getInstance().getRepairAnvilId()) { - if (ItemChecks.isTool(inHand) || ItemChecks.isArmor(inHand)) { - Repair.repairCheck(player, inHand); - event.setCancelled(true); - player.updateInventory(); - } - else if (ModChecks.isCustomTool(inHand) && ModChecks.getToolFromItemStack(inHand).isRepairable()) { - Repair.repairCheck(player, inHand); - event.setCancelled(true); - player.updateInventory(); - } - else if (ModChecks.isCustomArmor(inHand) && ModChecks.getArmorFromItemStack(inHand).isRepairable()) { - Repair.repairCheck(player, inHand); + if (mcMMO.repairManager.isRepairable(inHand)) { + mcMMO.repairManager.handleRepair(player, inHand); event.setCancelled(true); player.updateInventory(); }