程序包 org.bukkit

枚举 DyeColor

所有已实现的接口:
Serializable, Comparable<DyeColor>, java.lang.constant.Constable

public enum DyeColor extends Enum<DyeColor>
染料和布料所有支持的颜色值.
  • 枚举常量详细资料

    • WHITE

      public static final DyeColor WHITE
      代表白色染料.
    • ORANGE

      public static final DyeColor ORANGE
      代表橙色染料.
    • MAGENTA

      public static final DyeColor MAGENTA
      代表品红色染料.
    • LIGHT_BLUE

      public static final DyeColor LIGHT_BLUE
      代表淡蓝色染料.
    • YELLOW

      public static final DyeColor YELLOW
      代表黄色染料.
    • LIME

      public static final DyeColor LIME
      代表黄绿色染料.
    • PINK

      public static final DyeColor PINK
      代表粉色染料.
    • GRAY

      public static final DyeColor GRAY
      代表灰色染料.
    • LIGHT_GRAY

      public static final DyeColor LIGHT_GRAY
      代表淡灰色染料.
    • CYAN

      public static final DyeColor CYAN
      代表青色染料.
    • PURPLE

      public static final DyeColor PURPLE
      代表紫色染料.
    • BLUE

      public static final DyeColor BLUE
      代表蓝色染料.
    • BROWN

      public static final DyeColor BROWN
      代表棕色染料.
    • GREEN

      public static final DyeColor GREEN
      代表绿色染料.
    • RED

      public static final DyeColor RED
      代表红色染料.
    • BLACK

      public static final DyeColor BLACK
      代表黑色染料.
  • 方法详细资料

    • values

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

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

      @Deprecated public byte getWoolData()
      已过时。
      不安全的参数
      获取这个颜色代表的相关羊毛的数据值.

      原文: Gets the associated wool data value representing this color.

      返回:
      包含这种颜色的羊毛的数据值字节
      另请参阅:
    • getDyeData

      @Deprecated public byte getDyeData()
      已过时。
      魔法值
      获取代表这种颜色的染料数据值.

      原文: Gets the associated dye data value representing this color.

      返回:
      包含这种颜色的染料数据值字节
      另请参阅:
    • getColor

      @NotNull public @NotNull Color getColor()
      获取这个染料代表的颜色.

      原文: Gets the color that this dye represents.

      返回:
      染料代表的颜色(Color)
    • getFireworkColor

      @NotNull public @NotNull Color getFireworkColor()
      获取这个染料代表的烟花颜色.

      原文: Gets the firework color that this dye represents.

      返回:
      染料代表的颜色(Color)
    • getByWoolData

      @Deprecated @Nullable public static @Nullable DyeColor getByWoolData(byte data)
      已过时。
      魔法值
      获取给定的羊毛数据值的染料颜色.

      原文: Gets the DyeColor with the given wool data value.

      参数:
      data - 将要获取的羊毛数据值
      返回:
      给定值代表的染料颜色(DyeColor),如果不存在则为null
      另请参阅:
    • getByDyeData

      @Deprecated @Nullable public static @Nullable DyeColor getByDyeData(byte data)
      已过时。
      不安全的参数
      用给定的数据值获取DyeColor.

      原文: Gets the DyeColor with the given dye data value.

      参数:
      data - 要获取的染料数据值
      返回:
      给定值代表的染料颜色(DyeColor),如果不存在则为null
      另请参阅:
    • getByColor

      @Nullable public static @Nullable DyeColor getByColor(@NotNull @NotNull Color color)
      获取给定的颜色值的染料颜色.

      原文: Gets the DyeColor with the given color value.

      参数:
      color - 要获取的染料的颜色值
      返回:
      给定值代表的染料颜色(DyeColor),如果不存在则为null
    • getByFireworkColor

      @Nullable public static @Nullable DyeColor getByFireworkColor(@NotNull @NotNull Color color)
      获取给定的颜色颜色值的染料颜色.

      原文: Gets the DyeColor with the given firework color value.

      参数:
      color - 要获取的染料的颜色值
      返回:
      给定值代表的染料颜色(DyeColor),如果不存在则为null
    • legacyValueOf

      @Deprecated @NotNull public static @NotNull DyeColor legacyValueOf(@Nullable @Nullable String name)
      已过时。
      legacy use only
      Gets the DyeColor for the given name, possibly doing legacy transformations.
      参数:
      name - dye name
      返回:
      dye color