isEnchantedWith

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

Checks is an item is enchanted with enchantment

Parameters

enchantment

The registry key of the enchantment to check

registryManager

The registry manager of a world

See also