Package org.bukkit
Enum DyeColor
- All Implemented Interfaces:
- Serializable,- Comparable<DyeColor>,- Constable
public enum DyeColor extends Enum<DyeColor>
All supported color values for dyes and cloth
- 
Nested Class Summary
- 
Enum Constant SummaryEnum Constants Enum Constant Description BLACKRepresents black dye.BLUERepresents blue dye.BROWNRepresents brown dye.CYANRepresents cyan dye.GRAYRepresents gray dye.GREENRepresents green dye.LIGHT_BLUERepresents light blue dye.LIGHT_GRAYRepresents light gray dye.LIMERepresents lime dye.MAGENTARepresents magenta dye.ORANGERepresents orange dye.PINKRepresents pink dye.PURPLERepresents purple dye.REDRepresents red dye.WHITERepresents white dye.YELLOWRepresents yellow dye.
- 
Method SummaryModifier and Type Method Description static DyeColorgetByColor(Color color)Gets the DyeColor with the given color value.static DyeColorgetByDyeData(byte data)Deprecated.Magic valuestatic DyeColorgetByFireworkColor(Color color)Gets the DyeColor with the given firework color value.static DyeColorgetByWoolData(byte data)Deprecated.Magic valueColorgetColor()Gets the color that this dye represents.bytegetDyeData()Deprecated.Magic valueColorgetFireworkColor()Gets the firework color that this dye represents.bytegetWoolData()Deprecated.Magic valuestatic DyeColorlegacyValueOf(String name)Deprecated.legacy use onlystatic DyeColorvalueOf(String name)Returns the enum constant of this type with the specified name.static DyeColor[]values()Returns an array containing the constants of this enum type, in the order they are declared.
- 
Enum Constant Details- 
WHITERepresents white dye.
- 
ORANGERepresents orange dye.
- 
MAGENTARepresents magenta dye.
- 
LIGHT_BLUERepresents light blue dye.
- 
YELLOWRepresents yellow dye.
- 
LIMERepresents lime dye.
- 
PINKRepresents pink dye.
- 
GRAYRepresents gray dye.
- 
LIGHT_GRAYRepresents light gray dye.
- 
CYANRepresents cyan dye.
- 
PURPLERepresents purple dye.
- 
BLUERepresents blue dye.
- 
BROWNRepresents brown dye.
- 
GREENRepresents green dye.
- 
REDRepresents red dye.
- 
BLACKRepresents black dye.
 
- 
- 
Method Details- 
valuesReturns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
 
- 
valueOfReturns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
- NullPointerException- if the argument is null
 
- 
getWoolDataDeprecated.Magic valueGets the associated wool data value representing this color.- Returns:
- A byte containing the wool data value of this color
- See Also:
- getDyeData()
 
- 
getDyeDataDeprecated.Magic valueGets the associated dye data value representing this color.- Returns:
- A byte containing the dye data value of this color
- See Also:
- getWoolData()
 
- 
getColorGets the color that this dye represents.- Returns:
- The Colorthat this dye represents
 
- 
getFireworkColorGets the firework color that this dye represents.- Returns:
- The Colorthat this dye represents
 
- 
getByWoolDataDeprecated.Magic valueGets the DyeColor with the given wool data value.- Parameters:
- data- Wool data value to fetch
- Returns:
- The DyeColorrepresenting the given value, or null if it doesn't exist
- See Also:
- getByDyeData(byte)
 
- 
getByDyeDataDeprecated.Magic valueGets the DyeColor with the given dye data value.- Parameters:
- data- Dye data value to fetch
- Returns:
- The DyeColorrepresenting the given value, or null if it doesn't exist
- See Also:
- getByWoolData(byte)
 
- 
getByColorGets the DyeColor with the given color value.- Parameters:
- color- Color value to get the dye by
- Returns:
- The DyeColorrepresenting the given value, or null if it doesn't exist
 
- 
getByFireworkColorGets the DyeColor with the given firework color value.- Parameters:
- color- Color value to get dye by
- Returns:
- The DyeColorrepresenting the given value, or null if it doesn't exist
 
- 
legacyValueOfDeprecated.legacy use onlyGets the DyeColor for the given name, possibly doing legacy transformations.- Parameters:
- name- dye name
- Returns:
- dye color
 
 
-