枚举 EnchantmentTarget

java.lang.Object
java.lang.Enum<EnchantmentTarget>
org.bukkit.enchantments.EnchantmentTarget
所有已实现的接口:
Serializable, Comparable<EnchantmentTarget>, java.lang.constant.Constable

public enum EnchantmentTarget extends Enum<EnchantmentTarget>
代表了Enchantment的适用目标
  • 枚举常量详细资料

    • ALL

      @Deprecated public static final EnchantmentTarget ALL
      已过时。
      原版中该适用目标不复存在
      允许将这个附魔用于所有的物品上.

      原文: Allows the Enchantment to be placed on all items

    • ARMOR

      public static final EnchantmentTarget ARMOR
      允许将该附魔用于装备上. (包括鞋子,护腿,衣服以及帽子)

      原文: Allows the Enchantment to be placed on armor

    • ARMOR_FEET

      public static final EnchantmentTarget ARMOR_FEET
      允许将该附魔用于鞋子上.

      原文: Allows the Enchantment to be placed on feet slot armor

    • ARMOR_LEGS

      public static final EnchantmentTarget ARMOR_LEGS
      允许将该附魔用于护腿上.

      原文: Allows the Enchantment to be placed on leg slot armor

    • ARMOR_TORSO

      public static final EnchantmentTarget ARMOR_TORSO
      允许将该附魔用于衣服上.

      原文: Allows the Enchantment to be placed on torso slot armor

    • ARMOR_HEAD

      public static final EnchantmentTarget ARMOR_HEAD
      允许将该附魔用于帽子上.

      原文: Allows the Enchantment to be placed on head slot armor

    • WEAPON

      public static final EnchantmentTarget WEAPON
      允许将该附魔用于剑上.

      原文: Allows the Enchantment to be placed on weapons (swords)

    • TOOL

      public static final EnchantmentTarget TOOL
      允许将该附魔用于工具上,如锹,稿,斧。

      原文: Allows the Enchantment to be placed on tools (spades, pickaxe, axes)

    • BOW

      public static final EnchantmentTarget BOW
      允许将该附魔用于弓上.

      原文: Allows the Enchantment to be placed on bows.

    • FISHING_ROD

      public static final EnchantmentTarget FISHING_ROD
      允许将该附魔用于钓鱼竿上.

      原文: Allows the Enchantment to be placed on fishing rods.

    • BREAKABLE

      public static final EnchantmentTarget BREAKABLE
      允许将该附魔用于带耐久度的物品上.

      原文:Allows the enchantment to be placed on items with durability.

    • WEARABLE

      public static final EnchantmentTarget WEARABLE
      允许将这类附魔附加于可穿戴物品.

      原文:Allows the enchantment to be placed on wearable items.

    • TRIDENT

      public static final EnchantmentTarget TRIDENT
      允许将这类附魔附加于三叉戟.
    • CROSSBOW

      public static final EnchantmentTarget CROSSBOW
      允许将这类附魔附加于弩上.
    • VANISHABLE

      public static final EnchantmentTarget VANISHABLE
      允许将这类附魔附加于vanishing items.
  • 方法详细资料

    • values

      public static EnchantmentTarget[] values()
      按照声明该枚举类型的常量的顺序, 返回一个包含这些常量的数组。
      返回:
      按照声明该枚举类型的常量的顺序返回的包含这些常量的数组
    • valueOf

      public static EnchantmentTarget valueOf(String name)
      返回带有指定名称的该类型的枚举常量。 字符串必须与用于声明该类型的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)
      参数:
      name - 要返回的枚举常量的名称。
      返回:
      返回带有指定名称的枚举常量
      抛出:
      IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量
      NullPointerException - 如果参数为空值
    • includes

      public abstract boolean includes(@NotNull @NotNull Material item)
      检查本适用目标是否包含该物品类型.

      原文: Check whether this target includes the specified item.

      参数:
      item - 物品
      返回:
      如果包含则返回true
    • includes

      public boolean includes(@NotNull @NotNull ItemStack item)
      检查本适用目标是否包含该物品.

      原文:Check whether this target includes the specified item.

      参数:
      item - 物品
      返回:
      如果包含则返回true