Keyedpublic class EnchantmentWrapper extends Enchantment
EnchantmentsARROW_DAMAGE, ARROW_FIRE, ARROW_INFINITE, ARROW_KNOCKBACK, BINDING_CURSE, CHANNELING, DAMAGE_ALL, DAMAGE_ARTHROPODS, DAMAGE_UNDEAD, DEPTH_STRIDER, DIG_SPEED, DURABILITY, FIRE_ASPECT, FROST_WALKER, IMPALING, KNOCKBACK, LOOT_BONUS_BLOCKS, LOOT_BONUS_MOBS, LOYALTY, LUCK, LURE, MENDING, MULTISHOT, OXYGEN, PIERCING, PROTECTION_ENVIRONMENTAL, PROTECTION_EXPLOSIONS, PROTECTION_FALL, PROTECTION_FIRE, PROTECTION_PROJECTILE, QUICK_CHARGE, RIPTIDE, SILK_TOUCH, SWEEPING_EDGE, THORNS, VANISHING_CURSE, WATER_WORKER| Constructor | Description | 
|---|---|
| EnchantmentWrapper(@NotNull String name) | 
| Modifier and Type | Method | Description | 
|---|---|---|
| boolean | canEnchantItem(@NotNull ItemStack item) | Checks if this Enchantment may be applied to the given  ItemStack. | 
| boolean | conflictsWith(@NotNull Enchantment other) | Check if this enchantment conflicts with another enchantment. | 
| @NotNull Enchantment | getEnchantment() | Gets the enchantment bound to this wrapper | 
| @NotNull EnchantmentTarget | getItemTarget() | Gets the type of  ItemStackthat may fit this Enchantment. | 
| int | getMaxLevel() | Gets the maximum level that this Enchantment may become. | 
| @NotNull String | getName() | Gets the unique name of this enchantment | 
| int | getStartLevel() | Gets the level that this Enchantment should start at | 
| boolean | isCursed() | Checks if this enchantment is a cursed enchantment
  Cursed enchantments are found the same way treasure enchantments are | 
| boolean | isTreasure() | Checks if this enchantment is a treasure enchantment. | 
equals, getByKey, getByName, getKey, hashCode, isAcceptingRegistrations, registerEnchantment, stopAcceptingRegistrations, toString, valuespublic EnchantmentWrapper(@NotNull
                          @NotNull String name)
@NotNull public @NotNull Enchantment getEnchantment()
public int getMaxLevel()
EnchantmentgetMaxLevel in class Enchantmentpublic int getStartLevel()
EnchantmentgetStartLevel in class Enchantment@NotNull public @NotNull EnchantmentTarget getItemTarget()
EnchantmentItemStack that may fit this Enchantment.getItemTarget in class Enchantmentpublic boolean canEnchantItem(@NotNull
                              @NotNull ItemStack item)
EnchantmentItemStack.
 This does not check if it conflicts with any enchantments already applied to the item.
canEnchantItem in class Enchantmentitem - Item to test@NotNull public @NotNull String getName()
EnchantmentgetName in class Enchantmentpublic boolean isTreasure()
EnchantmentisTreasure in class Enchantmentpublic boolean isCursed()
EnchantmentisCursed in class Enchantmentpublic boolean conflictsWith(@NotNull
                             @NotNull Enchantment other)
EnchantmentconflictsWith in class Enchantmentother - The enchantment to check againstCopyright © 2020. All rights reserved.