Fix unbreakable items

This commit is contained in:
Xayanix 2024-04-07 00:56:36 +02:00
parent afa576f21d
commit 4cc4b95db0

View File

@ -640,6 +640,8 @@ class Minion(
val meta = toolMeta as? Damageable ?: return
if (tool?.itemMeta?.isUnbreakable == true) return
if (Math.random() > 1f / (meta.getEnchantLevel(Enchantment.DURABILITY) + 1)) return
if ((tool?.type?.maxDurability ?: return) <= meta.damage + amount) {