mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-30 00:56:47 +01:00
Also add the cancel feature for the Salvage Anvil
This commit is contained in:
parent
68a7b540c5
commit
bdc753f03c
@ -365,6 +365,16 @@ public class PlayerListener implements Listener {
|
|||||||
player.sendMessage(ChatColor.RED + "Repair cancelled!"); //TODO Locale!
|
player.sendMessage(ChatColor.RED + "Repair cancelled!"); //TODO Locale!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/* SALVAGE CHECKS */
|
||||||
|
else if (blockID == Repair.salvageAnvilId && Permissions.salvage(player) && Repair.isSalvageable(heldItem)) {
|
||||||
|
RepairManager repairManager = UserManager.getPlayer(player).getRepairManager();
|
||||||
|
|
||||||
|
// Cancel salvaging an enchanted item
|
||||||
|
if (repairManager.checkConfirmation(blockID, false) && Config.getInstance().getRepairConfirmRequired()) {
|
||||||
|
UserManager.getPlayer(player).setLastAnvilUse(Repair.salvageAnvilId, 0);
|
||||||
|
player.sendMessage(ChatColor.RED + "Salvage cancelled!"); //TODO Locale!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user