mirror of
https://github.com/Artillex-Studios/AxMinions.git
synced 2025-01-24 21:31:29 +01:00
Fix durability
This commit is contained in:
parent
63c7b6b741
commit
5553ef3744
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user