public abstract class Enchantment extends Object
| Modifier and Type | Field and Description | 
|---|---|
| static Enchantment | ARROW_DAMAGEProvides extra damage when shooting arrows from bows | 
| static Enchantment | ARROW_FIRESets entities on fire when hit by arrows shot from a bow | 
| static Enchantment | ARROW_INFINITEProvides infinite arrows when shooting a bow | 
| static Enchantment | ARROW_KNOCKBACKProvides a knockback when an entity is hit by an arrow from a bow | 
| static Enchantment | DAMAGE_ALLIncreases damage against all targets | 
| static Enchantment | DAMAGE_ARTHROPODSIncreases damage against arthropod targets | 
| static Enchantment | DAMAGE_UNDEADIncreases damage against undead targets | 
| static Enchantment | DEPTH_STRIDERIncreases walking speed while in water | 
| static Enchantment | DIG_SPEEDIncreases the rate at which you mine/dig | 
| static Enchantment | DURABILITYDecreases the rate at which a tool looses durability | 
| static Enchantment | FIRE_ASPECTWhen attacking a target, has a chance to set them on fire | 
| static Enchantment | FROST_WALKERFreezes any still water adjacent to ice / frost which player is walking on | 
| static Enchantment | KNOCKBACKAll damage to other targets will knock them back when hit | 
| static Enchantment | LOOT_BONUS_BLOCKSProvides a chance of gaining extra loot when destroying blocks | 
| static Enchantment | LOOT_BONUS_MOBSProvides a chance of gaining extra loot when killing monsters | 
| static Enchantment | LUCKDecreases odds of catching worthless junk | 
| static Enchantment | LUREIncreases rate of fish biting your hook | 
| static Enchantment | MENDINGAllows mending the item using experience orbs | 
| static Enchantment | OXYGENDecreases the rate of air loss whilst underwater | 
| static Enchantment | PROTECTION_ENVIRONMENTALProvides protection against environmental damage | 
| static Enchantment | PROTECTION_EXPLOSIONSProvides protection against explosive damage | 
| static Enchantment | PROTECTION_FALLProvides protection against fall damage | 
| static Enchantment | PROTECTION_FIREProvides protection against fire damage | 
| static Enchantment | PROTECTION_PROJECTILEProvides protection against projectile damage | 
| static Enchantment | SILK_TOUCHAllows blocks to drop themselves instead of fragments (for example,
 stone instead of cobblestone) | 
| static Enchantment | THORNSDamages the attacker | 
| static Enchantment | WATER_WORKERIncreases the speed at which a player may mine underwater | 
| Constructor and Description | 
|---|
| Enchantment(int id) | 
| Modifier and Type | Method and Description | 
|---|---|
| abstract boolean | canEnchantItem(ItemStack item)Checks if this Enchantment may be applied to the given  ItemStack. | 
| abstract boolean | conflictsWith(Enchantment other)Check if this enchantment conflicts with another enchantment. | 
| boolean | equals(Object obj) | 
| static Enchantment | getById(int id)Deprecated. 
 Magic value | 
| static Enchantment | getByName(String name)Gets the Enchantment at the specified name | 
| int | getId()Deprecated. 
 Magic value | 
| abstract EnchantmentTarget | getItemTarget()Gets the type of  ItemStackthat may fit this Enchantment. | 
| abstract int | getMaxLevel()Gets the maximum level that this Enchantment may become. | 
| abstract String | getName()Gets the unique name of this enchantment | 
| abstract int | getStartLevel()Gets the level that this Enchantment should start at | 
| int | hashCode() | 
| static boolean | isAcceptingRegistrations()Checks if this is accepting Enchantment registrations. | 
| abstract boolean | isTreasure()Checks if this enchantment is a treasure enchantment. | 
| static void | registerEnchantment(Enchantment enchantment)Registers an enchantment with the given ID and object. | 
| static void | stopAcceptingRegistrations()Stops accepting any enchantment registrations | 
| String | toString() | 
| static Enchantment[] | values()Gets an array of all the registered  Enchantments | 
public static final Enchantment PROTECTION_ENVIRONMENTAL
public static final Enchantment PROTECTION_FIRE
public static final Enchantment PROTECTION_FALL
public static final Enchantment PROTECTION_EXPLOSIONS
public static final Enchantment PROTECTION_PROJECTILE
public static final Enchantment OXYGEN
public static final Enchantment WATER_WORKER
public static final Enchantment THORNS
public static final Enchantment DEPTH_STRIDER
public static final Enchantment FROST_WALKER
public static final Enchantment DAMAGE_ALL
public static final Enchantment DAMAGE_UNDEAD
public static final Enchantment DAMAGE_ARTHROPODS
public static final Enchantment KNOCKBACK
public static final Enchantment FIRE_ASPECT
public static final Enchantment LOOT_BONUS_MOBS
public static final Enchantment DIG_SPEED
public static final Enchantment SILK_TOUCH
public static final Enchantment DURABILITY
public static final Enchantment LOOT_BONUS_BLOCKS
public static final Enchantment ARROW_DAMAGE
public static final Enchantment ARROW_KNOCKBACK
public static final Enchantment ARROW_FIRE
public static final Enchantment ARROW_INFINITE
public static final Enchantment LUCK
public static final Enchantment LURE
public static final Enchantment MENDING
@Deprecated public int getId()
public abstract String getName()
public abstract int getMaxLevel()
public abstract int getStartLevel()
public abstract EnchantmentTarget getItemTarget()
ItemStack that may fit this Enchantment.public abstract boolean isTreasure()
public abstract boolean conflictsWith(Enchantment other)
other - The enchantment to check againstpublic abstract boolean canEnchantItem(ItemStack item)
ItemStack.
 This does not check if it conflicts with any enchantments already applied to the item.
item - Item to testpublic static void registerEnchantment(Enchantment enchantment)
Generally not to be used from within a plugin.
enchantment - Enchantment to registerpublic static boolean isAcceptingRegistrations()
public static void stopAcceptingRegistrations()
@Deprecated public static Enchantment getById(int id)
id - ID to fetchpublic static Enchantment getByName(String name)
name - Name to fetchpublic static Enchantment[] values()
EnchantmentsCopyright © 2016. All rights reserved.