enchant

fun enchant(enchants: Map<Enchantment, Int>): ItemBuilder(source)

Adds enchants to the item.

Return

the modified ItemBuilder instance.

Parameters

enchants

a map containing the enchantments to be added, where the key is the enchantment and the value is the level of the enchantment.