mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-01-19 08:55:26 +01:00
Use new system!
This commit is contained in:
parent
9f9c0059a5
commit
c890ff5605
@ -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();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user