UEEnchanter

@Since(version = "2.2")
interface UEEnchanter

This interface represents UnderscoreEnchants' enchanter.

At no point should you implement this interface, as it is implemented by UnderscoreEnchants.

Functions

Link copied to clipboard
@Since(version = "2.2")
abstract fun disenchant(item: ItemStack, key: NamespacedKey): ItemStack

Disenchants an item - removes an enchantment, found by a key

@Since(version = "2.2")
abstract fun disenchant(player: Player, slot: EquipmentSlot, key: NamespacedKey)

Disenchants a player's item - removes an enchantment, found by this namespaced key, in a given slot

Link copied to clipboard
@Since(version = "2.2")
abstract fun enchant(item: ItemStack, key: NamespacedKey, level: Int, liftedRestrictions: List<EnchantingRestriction>): ItemStackEnchantResponse

Enchants an item with an enchantment, found by this namespaced key, with a given level and a list of liftedRestrictions

Link copied to clipboard
@Since(version = "2.2")
abstract fun fullyDisenchant(item: ItemStack): ItemStack

Fully disenchants an item

@Since(version = "2.2")
abstract fun fullyDisenchant(player: Player, slot: EquipmentSlot)

Fully disenchants a player's item in a given slot

Link copied to clipboard
@Since(version = "2.2")
abstract fun getUnderscoreEnchantment(name: String): NamespacedKey?

Gets the namespaced key of an enchantment by its name.