Package org.bukkit
Enum Class DyeColor
- All Implemented Interfaces:
Serializable
,Comparable<DyeColor>
,Constable
All supported color values for dyes and cloth
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionRepresents black dye.Represents blue dye.Represents brown dye.Represents cyan dye.Represents gray dye.Represents green dye.Represents light blue dye.Represents light gray dye.Represents lime dye.Represents magenta dye.Represents orange dye.Represents pink dye.Represents purple dye.Represents red dye.Represents white dye.Represents yellow dye. -
Method Summary
Modifier and TypeMethodDescriptionstatic DyeColor
getByColor
(Color color) Gets the DyeColor with the given color value.static DyeColor
getByDyeData
(byte data) Deprecated.Magic valuestatic DyeColor
getByFireworkColor
(Color color) Gets the DyeColor with the given firework color value.static DyeColor
getByWoolData
(byte data) Deprecated.Magic valuegetColor()
Gets the color that this dye represents.byte
Deprecated.Magic valueGets the firework color that this dye represents.byte
Deprecated.Magic valuestatic DyeColor
legacyValueOf
(String name) Deprecated.legacy use onlystatic DyeColor
Returns the enum constant of this class with the specified name.static DyeColor[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
WHITE
Represents white dye. -
ORANGE
Represents orange dye. -
MAGENTA
Represents magenta dye. -
LIGHT_BLUE
Represents light blue dye. -
YELLOW
Represents yellow dye. -
LIME
Represents lime dye. -
PINK
Represents pink dye. -
GRAY
Represents gray dye. -
LIGHT_GRAY
Represents light gray dye. -
CYAN
Represents cyan dye. -
PURPLE
Represents purple dye. -
BLUE
Represents blue dye. -
BROWN
Represents brown dye. -
GREEN
Represents green dye. -
RED
Represents red dye. -
BLACK
Represents black dye.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getWoolData
Deprecated.Magic valueGets the associated wool data value representing this color.- Returns:
- A byte containing the wool data value of this color
- See Also:
-
getDyeData
Deprecated.Magic valueGets the associated dye data value representing this color.- Returns:
- A byte containing the dye data value of this color
- See Also:
-
getColor
Gets the color that this dye represents.- Returns:
- The
Color
that this dye represents
-
getFireworkColor
Gets the firework color that this dye represents.- Returns:
- The
Color
that this dye represents
-
getByWoolData
Deprecated.Magic valueGets 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
Deprecated.Magic valueGets 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
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
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
Deprecated.legacy use onlyGets the DyeColor for the given name, possibly doing legacy transformations.- Parameters:
name
- dye name- Returns:
- dye color
-