API

API Methods

hasEnchantment(ItemStack stack) —> boolean
Returns true if the specified ItemStack has a custom enchantment
getEnchantments(ItemStack stack) —> Map<String, Integer>
Returns enchantment names mapped to their enchantment level
isCompatible(String enchantmentName, ItemStack stack) —> boolean
Returns true if the given enchantment is compatible with the specified ItemStack’s type
addEnchantment(ItemStack stack, String name, int level) —> boolean
Adds the given enchantment and enchantment level to the specified ItemStack and returns true if nothing is invalid
removeEnchantment(ItemStack stack, String name) —> boolean
Removes the given enchantment from the specified ItemStack and returns true if nothing is invalid

Comments

Posts Quoted:
Reply
Clear All Quotes