get Enchantment Level
fun ItemStack.getEnchantmentLevel(enchantment: RegistryKey<Enchantment>, registryManager: DynamicRegistryManager): Int(source)
Gets an enchantment level on an item
Parameters
enchantment
The registry key of the enchantment to check
registry Manager
The registry manager of a world