make Durable
Registers effectiveItem as durable with maxUses charges.
The bar is applied by apply at creation time, so this must run before the first EffectiveItem.createItemStack — otherwise already-built stacks have no durability. Call it from the item's init() in onEnable:
fun init() {
makeDurable(3) // via EffectiveItem, or EffectiveDurability.makeDurable(this, 3)
}Content copied to clipboard