Use new system!

This commit is contained in:
NuclearW 2012-05-22 05:18:08 -04:00
parent 9f9c0059a5
commit c890ff5605

View File

@ -214,18 +214,8 @@ public class PlayerListener implements Listener {
/* REPAIR CHECKS */ /* REPAIR CHECKS */
if (Permissions.getInstance().repair(player) && block.getTypeId() == Config.getInstance().getRepairAnvilId()) { if (Permissions.getInstance().repair(player) && block.getTypeId() == Config.getInstance().getRepairAnvilId()) {
if (ItemChecks.isTool(inHand) || ItemChecks.isArmor(inHand)) { if (mcMMO.repairManager.isRepairable(inHand)) {
Repair.repairCheck(player, inHand); mcMMO.repairManager.handleRepair(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);
event.setCancelled(true); event.setCancelled(true);
player.updateInventory(); player.updateInventory();
} }