Serializable
, Comparable<EnchantmentTarget>
public enum EnchantmentTarget extends Enum<EnchantmentTarget>
Enchantment
Enum Constant | Description |
---|---|
ALL |
Allows the Enchantment to be placed on all items
|
ARMOR |
Allows the Enchantment to be placed on armor
|
ARMOR_FEET |
Allows the Enchantment to be placed on feet slot armor
|
ARMOR_HEAD |
Allows the Enchantment to be placed on head slot armor
|
ARMOR_LEGS |
Allows the Enchantment to be placed on leg slot armor
|
ARMOR_TORSO |
Allows the Enchantment to be placed on torso slot armor
|
BOW |
Allows the Enchantment to be placed on bows.
|
BREAKABLE |
Allows the enchantment to be placed on items with durability.
|
FISHING_ROD |
Allows the Enchantment to be placed on fishing rods.
|
TOOL |
Allows the Enchantment to be placed on tools (spades, pickaxe, hoes,
axes)
|
TRIDENT |
Allow the Enchantment to be placed on tridents.
|
WEAPON |
Allows the Enchantment to be placed on weapons (swords)
|
WEARABLE |
Allows the enchantment to be placed on wearable items.
|
Modifier and Type | Method | 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 final EnchantmentTarget WEARABLE
public static final EnchantmentTarget TRIDENT
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(@NotNull Material item)
item
- The item to checkpublic boolean includes(@NotNull ItemStack item)
item
- The item to checkCopyright © 2020. All rights reserved.