enchants

fun enchants(canEnchant: (ItemStack) -> Boolean)

Sets the items to which this enchantment can be applied to, for example in an anvil.

To have the enchantment appear in the enchanting table, use enchantsPrimary.

For your own custom items, prefer configuring the supported enchantments via the Enchantable item behavior.