Package org.bukkit

Enum Class DyeColor

All Implemented Interfaces:
Serializable, Comparable<DyeColor>, Constable

public enum DyeColor extends Enum<DyeColor>
All supported color values for dyes and cloth
  • Enum Constant Details Link icon

    • WHITE Link icon

      public static final DyeColor WHITE
      Represents white dye.
    • ORANGE Link icon

      public static final DyeColor ORANGE
      Represents orange dye.
    • MAGENTA Link icon

      public static final DyeColor MAGENTA
      Represents magenta dye.
    • LIGHT_BLUE Link icon

      public static final DyeColor LIGHT_BLUE
      Represents light blue dye.
    • YELLOW Link icon

      public static final DyeColor YELLOW
      Represents yellow dye.
    • LIME Link icon

      public static final DyeColor LIME
      Represents lime dye.
    • PINK Link icon

      public static final DyeColor PINK
      Represents pink dye.
    • GRAY Link icon

      public static final DyeColor GRAY
      Represents gray dye.
    • LIGHT_GRAY Link icon

      public static final DyeColor LIGHT_GRAY
      Represents light gray dye.
    • CYAN Link icon

      public static final DyeColor CYAN
      Represents cyan dye.
    • PURPLE Link icon

      public static final DyeColor PURPLE
      Represents purple dye.
    • BLUE Link icon

      public static final DyeColor BLUE
      Represents blue dye.
    • BROWN Link icon

      public static final DyeColor BROWN
      Represents brown dye.
    • GREEN Link icon

      public static final DyeColor GREEN
      Represents green dye.
    • RED Link icon

      public static final DyeColor RED
      Represents red dye.
    • BLACK Link icon

      public static final DyeColor BLACK
      Represents black dye.
  • Method Details Link icon

    • values Link icon

      public static DyeColor[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf Link icon

      public static DyeColor valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getWoolData Link icon

      @Deprecated(since="1.6.2") public byte getWoolData()
      Deprecated.
      Magic value
      Gets the associated wool data value representing this color.
      Returns:
      A byte containing the wool data value of this color
      See Also:
    • getDyeData Link icon

      @Deprecated(since="1.6.2") public byte getDyeData()
      Deprecated.
      Magic value
      Gets the associated dye data value representing this color.
      Returns:
      A byte containing the dye data value of this color
      See Also:
    • getColor Link icon

      @NotNull public Color getColor()
      Gets the color that this dye represents.
      Returns:
      The Color that this dye represents
    • getFireworkColor Link icon

      @NotNull public Color getFireworkColor()
      Gets the firework color that this dye represents.
      Returns:
      The Color that this dye represents
    • getByWoolData Link icon

      @Deprecated(since="1.6.2") @Nullable public static DyeColor getByWoolData(byte data)
      Deprecated.
      Magic value
      Gets the DyeColor with the given wool data value.
      Parameters:
      data - Wool data value to fetch
      Returns:
      The DyeColor representing the given value, or null if it doesn't exist
      See Also:
    • getByDyeData Link icon

      @Deprecated(since="1.6.2") @Nullable public static DyeColor getByDyeData(byte data)
      Deprecated.
      Magic value
      Gets the DyeColor with the given dye data value.
      Parameters:
      data - Dye data value to fetch
      Returns:
      The DyeColor representing the given value, or null if it doesn't exist
      See Also:
    • getByColor Link icon

      @Nullable public static DyeColor getByColor(@NotNull Color color)
      Gets the DyeColor with the given color value.
      Parameters:
      color - Color value to get the dye by
      Returns:
      The DyeColor representing the given value, or null if it doesn't exist
    • getByFireworkColor Link icon

      @Nullable public static DyeColor getByFireworkColor(@NotNull Color color)
      Gets the DyeColor with the given firework color value.
      Parameters:
      color - Color value to get dye by
      Returns:
      The DyeColor representing the given value, or null if it doesn't exist
    • legacyValueOf Link icon

      @Deprecated(since="1.13") @NotNull public static DyeColor legacyValueOf(@Nullable String name)
      Deprecated.
      legacy use only
      Gets the DyeColor for the given name, possibly doing legacy transformations.
      Parameters:
      name - dye name
      Returns:
      dye color