Static
consumeThe player whose item durability will be consumed.
Optional
options: ConsumeDurabilityOptionsThe options for consuming durability.
Optional
breakSound?: stringWhether to suppress playing a sound when item breaks. Defaults to "random.break". If set to an empty string, no sound will be played.
Optional
ignoreEnchantments?: booleanWhether to ignore enchantments when consuming durability.
Optional
slot?: EquipmentSlotThe slot to consume durability from. Defaults to the player's main hand.
Optional
value?: numberThe amount of durability to consume. Defaults to 1.
True if the durability was consumed, false otherwise.
Static
getReturns the chance to consume durability from item based on the unbreaking level.
The unbreaking level of the item.
The chance to consume durability from item based on the unbreaking level.
Consumes durability from the player's selected item.