Make items in the Setup Mode toolbox unbreakable.
This makes it unnecessary to set the item durability, which was being done via deprecated API anyway. Partial fix for #406
This commit is contained in:
@@ -203,6 +203,7 @@ public class SetupCommand implements Command, Listener {
|
|||||||
color("&9Left&r: &r" + left),
|
color("&9Left&r: &r" + left),
|
||||||
color("&cRight&r: &r" + right)
|
color("&cRight&r: &r" + right)
|
||||||
));
|
));
|
||||||
|
meta.setUnbreakable(true);
|
||||||
tool.setItemMeta(meta);
|
tool.setItemMeta(meta);
|
||||||
return tool;
|
return tool;
|
||||||
}
|
}
|
||||||
@@ -245,7 +246,6 @@ public class SetupCommand implements Command, Listener {
|
|||||||
if (!isTool(tool)) return;
|
if (!isTool(tool)) return;
|
||||||
|
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
tool.setDurability((short) 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
|||||||
Reference in New Issue
Block a user