Add 1 extra use to capitator tools

This commit is contained in:
Gabriel Tofvesson 2021-06-22 15:37:08 +02:00
parent 6295fa609c
commit 7feda4b517

View File

@ -82,7 +82,7 @@ public class TreeCapitatorListener implements Listener {
}
private static int getMaxUses(final ItemStack stack, final Damageable tool) {
return ((stack.getEnchantmentLevel(Enchantment.DURABILITY) + 1) * (stack.getType().getMaxDurability()) - tool.getDamage());
return ((stack.getEnchantmentLevel(Enchantment.DURABILITY) + 1) * (stack.getType().getMaxDurability()) - tool.getDamage()) + 1;
}
private static boolean applyDamage(final ItemStack stack, final int brokenBlocks) {