Fix durability

This commit is contained in:
TomTom 2023-10-26 17:37:20 +02:00
parent 63c7b6b741
commit 5553ef3744

View File

@ -552,6 +552,8 @@ class Minion(
}
override fun damageTool(amount: Int) {
if (!Config.USE_DURABILITY()) return
val meta = this.tool?.itemMeta as? Damageable ?: return
if (Math.random() > 1f / (meta.getEnchantLevel(Enchantment.DURABILITY) + 1)) return