getEnchantmentLevel

public final static Integer getEnchantmentLevel(ItemStack $self, RegistryKey<Enchantment> enchantment, DynamicRegistryManager registryManager)(source)

Gets an enchantment level on an item

Parameters

enchantment

The registry key of the enchantment to check

registryManager

The registry manager of a world

See also