is Enchanted With
fun ItemStack.isEnchantedWith(enchantment: RegistryKey<Enchantment>, registryManager: DynamicRegistryManager): Boolean(source)
Checks is an item is enchanted with enchantment
Parameters
enchantment
The registry key of the enchantment to check
registry Manager
The registry manager of a world