org.bukkit
Enum DyeColor

java.lang.Object
  extended by java.lang.Enum<DyeColor>
      extended by org.bukkit.DyeColor
All Implemented Interfaces:
Serializable, Comparable<DyeColor>

public enum DyeColor
extends Enum<DyeColor>

All supported color values for dyes and cloth


Enum Constant Summary
BLACK
          Represents black dye
BLUE
          Represents blue dye
BROWN
          Represents brown dye
CYAN
          Represents cyan dye
GRAY
          Represents gray dye
GREEN
          Represents green dye
LIGHT_BLUE
          Represents light blue dye
LIME
          Represents lime dye
MAGENTA
          Represents magenta dye
ORANGE
          Represents orange dye
PINK
          Represents pink dye
PURPLE
          Represents purple dye
RED
          Represents red dye
SILVER
          Represents silver dye
WHITE
          Represents white dye
YELLOW
          Represents yellow dye
 
Method Summary
static DyeColor getByColor(Color color)
          Gets the DyeColor with the given color value
static DyeColor getByData(byte data)
          Deprecated. The name is misleading. It would imply Material.INK_SACK but uses Material.WOOL
static DyeColor getByDyeData(byte data)
          Gets the DyeColor with the given dye data value.
static DyeColor getByFireworkColor(Color color)
          Gets the DyeColor with the given firework color value
static DyeColor getByWoolData(byte data)
          Gets the DyeColor with the given wool data value.
 Color getColor()
          Gets the color that this dye represents
 byte getData()
          Deprecated. The name is misleading. It would imply Material.INK_SACK but uses Material.WOOL
 byte getDyeData()
          Gets the associated dye data value representing this color.
 Color getFireworkColor()
          Gets the firework color that this dye represents
 byte getWoolData()
          Gets the associated wool data value representing this color.
static DyeColor valueOf(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're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

WHITE

public static final DyeColor WHITE
Represents white dye


ORANGE

public static final DyeColor ORANGE
Represents orange dye


MAGENTA

public static final DyeColor MAGENTA
Represents magenta dye


LIGHT_BLUE

public static final DyeColor LIGHT_BLUE
Represents light blue dye


YELLOW

public static final DyeColor YELLOW
Represents yellow dye


LIME

public static final DyeColor LIME
Represents lime dye


PINK

public static final DyeColor PINK
Represents pink dye


GRAY

public static final DyeColor GRAY
Represents gray dye


SILVER

public static final DyeColor SILVER
Represents silver dye


CYAN

public static final DyeColor CYAN
Represents cyan dye


PURPLE

public static final DyeColor PURPLE
Represents purple dye


BLUE

public static final DyeColor BLUE
Represents blue dye


BROWN

public static final DyeColor BROWN
Represents brown dye


GREEN

public static final DyeColor GREEN
Represents green dye


RED

public static final DyeColor RED
Represents red dye


BLACK

public static final DyeColor BLACK
Represents black dye

Method Detail

values

public static final DyeColor[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(DyeColor c : DyeColor.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static DyeColor valueOf(String name)
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:
IllegalArgumentException - if this enum type has no constant with the specified name

getData

@Deprecated
public byte getData()
Deprecated. The name is misleading. It would imply Material.INK_SACK but uses Material.WOOL

Gets the associated (wool) data value representing this color.

Returns:
A byte containing the (wool) data value of this color
See Also:
getWoolData(), getDyeData()

getWoolData

public byte getWoolData()
Gets the associated wool data value representing this color.

Returns:
A byte containing the wool data value of this color
See Also:
getDyeData()

getDyeData

public byte getDyeData()
Gets the associated dye data value representing this color.

Returns:
A byte containing the dye data value of this color
See Also:
getWoolData()

getColor

public Color getColor()
Gets the color that this dye represents

Returns:
The Color that this dye represents

getFireworkColor

public Color getFireworkColor()
Gets the firework color that this dye represents

Returns:
The Color that this dye represents

getByData

@Deprecated
public static DyeColor getByData(byte data)
Deprecated. The name is misleading. It would imply Material.INK_SACK but uses Material.WOOL

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(byte), getByWoolData(byte)

getByWoolData

public static DyeColor getByWoolData(byte data)
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(byte)

getByDyeData

public static DyeColor getByDyeData(byte data)
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:
getByWoolData(byte)

getByColor

public static DyeColor getByColor(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

public static DyeColor getByFireworkColor(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


Copyright © 2013. All Rights Reserved.