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:
Andreas Troelsen 2019-07-22 00:10:40 +02:00
parent 0fa11eb84f
commit dd31a11b60
1 changed files with 1 additions and 1 deletions

View File

@ -203,6 +203,7 @@ public class SetupCommand implements Command, Listener {
color("&9Left&r: &r" + left),
color("&cRight&r: &r" + right)
));
meta.setUnbreakable(true);
tool.setItemMeta(meta);
return tool;
}
@ -245,7 +246,6 @@ public class SetupCommand implements Command, Listener {
if (!isTool(tool)) return;
event.setCancelled(true);
tool.setDurability((short) 0);
}
@EventHandler