public enum EnchantmentTarget extends Enum<EnchantmentTarget>
Enchantment
Enum Constant and Description |
---|
ALL
Deprecated.
this target no longer exists in Vanilla
|
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.
|
CROSSBOW
Allow the Enchantment to be placed on crossbows.
|
FISHING_ROD
Allows the Enchantment to be placed on fishing rods.
|
TOOL
Allows the Enchantment to be placed on tools (spades, pickaxe, axes)
|
TRIDENT
Allow the Enchantment to be placed on tridents.
|
VANISHABLE
Allow the Enchantment to be placed on vanishing items.
|
WEAPON
Allows the Enchantment to be placed on weapons (swords)
|
WEARABLE
Allows the enchantment to be placed on wearable items.
|
Modifier and Type | Method and Description |
---|---|
boolean |
includes(@NotNull ItemStack item)
Check whether this target includes the specified item.
|
abstract boolean |
includes(@NotNull 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.
|
@Deprecated 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 final EnchantmentTarget CROSSBOW
public static final EnchantmentTarget VANISHABLE
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 @NotNull Material item)
item
- The item to checkCopyright © 2021. All rights reserved.