Cleaner way to avoid salvaging chainmail.

This commit is contained in:
GJ 2013-05-28 12:59:10 -04:00
parent 54f135aebd
commit b0eb4b93a8
2 changed files with 2 additions and 2 deletions

View File

@ -356,7 +356,7 @@ public class PlayerListener implements Listener {
} }
} }
/* SALVAGE CHECKS */ /* SALVAGE CHECKS */
else if (blockID == Repair.salvageAnvilId && Permissions.salvage(player) && Repair.isSalvageable(heldItem) && !ItemUtils.isChainmailArmor(heldItem)) { else if (blockID == Repair.salvageAnvilId && Permissions.salvage(player) && Repair.isSalvageable(heldItem)) {
RepairManager repairManager = mcMMOPlayer.getRepairManager(); RepairManager repairManager = mcMMOPlayer.getRepairManager();
event.setCancelled(true); event.setCancelled(true);

View File

@ -33,7 +33,7 @@ public class Repair {
return true; return true;
} }
if (Config.getInstance().getSalvageArmor() && ItemUtils.isMinecraftArmor(item)) { if (Config.getInstance().getSalvageArmor() && !ItemUtils.isChainmailArmor(item) && ItemUtils.isMinecraftArmor(item)) {
return true; return true;
} }