Package org.bukkit
Enum DyeColor
java.lang.Object
java.lang.Enum<DyeColor>
org.bukkit.DyeColor
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<DyeColor>,java.lang.constant.Constable
public enum DyeColor extends java.lang.Enum<DyeColor>
All supported color values for dyes and cloth
-
Nested Class Summary
-
Enum Constant Summary
Enum 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.LIMERepresents lime dye.MAGENTARepresents magenta dye.ORANGERepresents orange dye.PINKRepresents pink dye.PURPLERepresents purple dye.REDRepresents red dye.SILVERRepresents silver dye.WHITERepresents white dye.YELLOWRepresents yellow dye. -
Method Summary
Modifier and Type Method Description static DyeColorgetByColor(Color color)Gets the DyeColor with the given color value.static DyeColorgetByData(byte data)Deprecated.The name is misleading.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.bytegetData()Deprecated.The name is misleading.bytegetDyeData()Deprecated.Magic valueColorgetFireworkColor()Gets the firework color that this dye represents.bytegetWoolData()Deprecated.Magic valuestatic DyeColorvalueOf(java.lang.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
-
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. -
SILVER
Represents silver 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 type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns 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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getData
@Deprecated public byte getData()Deprecated.The name is misleading. It would implyMaterial.INK_SACKbut usesMaterial.WOOLGets the associated (wool) data value representing this color.- Returns:
- A byte containing the (wool) data value of this color
- See Also:
getWoolData(),getDyeData()
-
getWoolData
@Deprecated public byte 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()
-
getDyeData
@Deprecated public byte 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:
getWoolData()
-
getColor
Gets the color that this dye represents.- Returns:
- The
Colorthat this dye represents
-
getFireworkColor
Gets the firework color that this dye represents.- Returns:
- The
Colorthat this dye represents
-
getByData
Deprecated.The name is misleading. It would implyMaterial.INK_SACKbut usesMaterial.WOOLGets 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),getByWoolData(byte)
-
getByWoolData
Deprecated.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)
-
getByDyeData
Deprecated.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)
-
getByColor
Gets 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
-
getByFireworkColor
Gets 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
-