public enum EnchantmentTarget extends Enum<EnchantmentTarget>
Enchantment| Enum Constant and Description | 
|---|
| ALLAllows the Enchantment to be placed on all items | 
| ARMORAllows the Enchantment to be placed on armor | 
| ARMOR_FEETAllows the Enchantment to be placed on feet slot armor | 
| ARMOR_HEADAllows the Enchantment to be placed on head slot armor | 
| ARMOR_LEGSAllows the Enchantment to be placed on leg slot armor | 
| ARMOR_TORSOAllows the Enchantment to be placed on torso slot armor | 
| BOWAllows the Enchantment to be placed on bows. | 
| BREAKABLEAllows the enchantment to be placed on items with durability. | 
| FISHING_RODAllows the Enchantment to be placed on fishing rods. | 
| TOOLAllows the Enchantment to be placed on tools (spades, pickaxe, hoes,
 axes) | 
| WEAPONAllows the Enchantment to be placed on weapons (swords) | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | includes(ItemStack item)Check whether this target includes the specified item. | 
| abstract boolean | includes(Material item)Check whether this target includes the specified item. | 
| static EnchantmentTarget | valueOf(String name)Returns the enum constant of this type with the specified name. | 
| static EnchantmentTarget[] | values()Returns an array containing the constants of this enum type, in
the order they are declared. | 
public static final EnchantmentTarget ALL
public static final EnchantmentTarget ARMOR
public static final EnchantmentTarget ARMOR_FEET
public static final EnchantmentTarget ARMOR_LEGS
public static final EnchantmentTarget ARMOR_TORSO
public static final EnchantmentTarget ARMOR_HEAD
public static final EnchantmentTarget WEAPON
public static final EnchantmentTarget TOOL
public static final EnchantmentTarget BOW
public static final EnchantmentTarget FISHING_ROD
public static final EnchantmentTarget BREAKABLE
public static EnchantmentTarget[] values()
for (EnchantmentTarget c : EnchantmentTarget.values()) System.out.println(c);
public static EnchantmentTarget valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic abstract boolean includes(Material item)
item - The item to checkpublic boolean includes(ItemStack item)
item - The item to checkCopyright © 2017. All rights reserved.