public enum EnchantmentTarget extends java.lang.Enum<EnchantmentTarget>
Enchantment
的适用目标枚举常量和说明 |
---|
ALL
允许将这个附魔用于所有的物品上.
|
ARMOR
允许将该附魔用于装备上.
|
ARMOR_FEET
允许将该附魔用于鞋子上.
|
ARMOR_HEAD
允许将该附魔用于帽子上.
|
ARMOR_LEGS
允许将该附魔用于护腿上.
|
ARMOR_TORSO
允许将该附魔用于衣服上.
|
BOW
允许将该附魔用于弓上.
|
BREAKABLE
允许将该附魔用于物品的耐久度上.
|
FISHING_ROD
允许将该附魔用于钓鱼竿上.
|
TOOL
允许将该附魔用于工具上,如锹,稿,锄,斧。
|
WEAPON
允许将该附魔用于剑上.
|
WEARABLE
允许将这类附魔附加于可穿戴物品.
|
限定符和类型 | 方法和说明 |
---|---|
boolean |
includes(ItemStack item)
检查是否包含该物品.
|
abstract boolean |
includes(Material item)
检查是否包含该物品类型.
|
static EnchantmentTarget |
valueOf(java.lang.String name)
返回带有指定名称的该类型的枚举常量。
|
static EnchantmentTarget[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final EnchantmentTarget ALL
原文: Allows the Enchantment to be placed on all items
public static final EnchantmentTarget ARMOR
原文: Allows the Enchantment to be placed on armor
public static final EnchantmentTarget ARMOR_FEET
原文: Allows the Enchantment to be placed on feet slot armor
public static final EnchantmentTarget ARMOR_LEGS
原文: Allows the Enchantment to be placed on leg slot armor
public static final EnchantmentTarget ARMOR_TORSO
原文: Allows the Enchantment to be placed on torso slot armor
public static final EnchantmentTarget ARMOR_HEAD
原文: Allows the Enchantment to be placed on head slot armor
public static final EnchantmentTarget WEAPON
原文: Allows the Enchantment to be placed on weapons (swords)
public static final EnchantmentTarget TOOL
原文: Allows the Enchantment to be placed on tools (spades, pickaxe, hoes, axes)
public static final EnchantmentTarget BOW
原文: Allows the Enchantment to be placed on bows.
public static final EnchantmentTarget FISHING_ROD
原文: Allows the Enchantment to be placed on fishing rods.
public static final EnchantmentTarget BREAKABLE
原文:Allows the enchantment to be placed on items with durability.
public static final EnchantmentTarget WEARABLE
原文:Allows the enchantment to be placed on wearable items.
public static EnchantmentTarget[] values()
for (EnchantmentTarget c : EnchantmentTarget.values()) System.out.println(c);
public static EnchantmentTarget valueOf(java.lang.String name)
name
- 要返回的枚举常量的名称。java.lang.IllegalArgumentException
- 如果该枚举类型没有带有指定名称的常量java.lang.NullPointerException
- 如果参数为空值public abstract boolean includes(Material item)
原文: Check whether this target includes the specified item.
item
- 物品public boolean includes(ItemStack item)
原文:Check whether this target includes the specified item.
item
- 物品