Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
bierdosenhalter committed Nov 14, 2022
1 parent 725f651 commit 4955a14
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/org/zeroBzeroT/antiillegals/AntiIllegals.java
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,7 @@ public static ItemState checkItemStack(ItemStack itemStack, final Location locat
if (AntiIllegals.instance.getConfig().getBoolean("unbreakables", true) && itemStack.getType().isItem() && !itemStack.getType().isEdible() && !itemStack.getType().isBlock() && (itemStack.getDurability() > itemStack.getType().getMaxDurability() || itemStack.getDurability() < 0 || itemStack.getItemMeta().isUnbreakable())) {
if (itemStack.getDurability() > itemStack.getType().getMaxDurability())
itemStack.setDurability(itemStack.getType().getMaxDurability());

if (itemStack.getDurability() < 0)
else if (itemStack.getDurability() < 0)
itemStack.setDurability((short) 0);

NBTItem nbt = new NBTItem(itemStack);
Expand Down

0 comments on commit 4955a14

Please sign in to comment.