enchant

fun enchant(enchantment: Enchantment, level: Int, ignoreLimit: Boolean = false): ItemBuilder

Adds an enchantment to the item.

Return

The ItemBuilder instance for method chaining.

Parameters

enchantment

The enchantment to add.

level

The level of the enchantment.

ignoreLimit

Whether to ignore the enchantment's level limit.