mirror of
https://github.com/BentoBoxWorld/AcidIsland.git
synced 2025-01-07 00:48:57 +01:00
fix: unbreakable item still damaged by acid
This commit is contained in:
parent
817ae62130
commit
1dd3b1bf85
@ -324,7 +324,7 @@ public class AcidEffect implements Listener {
|
||||
private static boolean damage(ItemStack item) {
|
||||
ItemMeta im = item.getItemMeta();
|
||||
|
||||
if (im instanceof Damageable d) {
|
||||
if (im instanceof Damageable d && !im.isUnbreakable()) {
|
||||
d.setDamage(d.getDamage() + 1);
|
||||
item.setItemMeta(d);
|
||||
return d.getDamage() >= item.getType().getMaxDurability();
|
||||
|
Loading…
Reference in New Issue
Block a user