Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.DyeColor Enum Reference

Public Member Functions

byte getData ()
 
byte getWoolData ()
 
byte getDyeData ()
 
Color getColor ()
 
Color getFireworkColor ()
 

Static Public Member Functions

static DyeColor getByData (final byte data)
 
static DyeColor getByWoolData (final byte data)
 
static DyeColor getByDyeData (final byte data)
 
static DyeColor getByColor (final Color color)
 
static DyeColor getByFireworkColor (final Color color)
 
 [static initializer]
 

Public Attributes

 WHITE =(0x0, 0xF, Color.WHITE, Color.fromRGB(0xF0F0F0))
 
 ORANGE =(0x1, 0xE, Color.fromRGB(0xD87F33), Color.fromRGB(0xEB8844))
 
 MAGENTA =(0x2, 0xD, Color.fromRGB(0xB24CD8), Color.fromRGB(0xC354CD))
 
 LIGHT_BLUE =(0x3, 0xC, Color.fromRGB(0x6699D8), Color.fromRGB(0x6689D3))
 
 YELLOW =(0x4, 0xB, Color.fromRGB(0xE5E533), Color.fromRGB(0xDECF2A))
 
 LIME =(0x5, 0xA, Color.fromRGB(0x7FCC19), Color.fromRGB(0x41CD34))
 
 PINK =(0x6, 0x9, Color.fromRGB(0xF27FA5), Color.fromRGB(0xD88198))
 
 GRAY =(0x7, 0x8, Color.fromRGB(0x4C4C4C), Color.fromRGB(0x434343))
 
 SILVER =(0x8, 0x7, Color.fromRGB(0x999999), Color.fromRGB(0xABABAB))
 
 CYAN =(0x9, 0x6, Color.fromRGB(0x4C7F99), Color.fromRGB(0x287697))
 
 PURPLE =(0xA, 0x5, Color.fromRGB(0x7F3FB2), Color.fromRGB(0x7B2FBE))
 
 BLUE =(0xB, 0x4, Color.fromRGB(0x334CB2), Color.fromRGB(0x253192))
 
 BROWN =(0xC, 0x3, Color.fromRGB(0x664C33), Color.fromRGB(0x51301A))
 
 GREEN =(0xD, 0x2, Color.fromRGB(0x667F33), Color.fromRGB(0x3B511A))
 
 RED =(0xE, 0x1, Color.fromRGB(0x993333), Color.fromRGB(0xB3312C))
 
 BLACK =(0xF, 0x0, Color.fromRGB(0x191919), Color.fromRGB(0x1E1B1B))
 

Detailed Description

All supported color values for dyes and cloth

Definition at line 10 of file DyeColor.java.

Member Function Documentation

static DyeColor org.bukkit.DyeColor.getByColor ( final Color  color)
static

Gets the DyeColor with the given color value.

Parameters
colorColor value to get the dye by
Returns
The DyeColor representing the given value, or null if it doesn't exist

Definition at line 208 of file DyeColor.java.

208  {
209  return BY_COLOR.get(color);
210  }
static DyeColor org.bukkit.DyeColor.getByData ( final byte  data)
static

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
Deprecated:
The name is misleading. It would imply Material#INK_SACK but uses Material#WOOL
See also
#getByDyeData(byte)
#getByWoolData(byte)

Definition at line 161 of file DyeColor.java.

161  {
162  return getByWoolData(data);
163  }
static DyeColor getByWoolData(final byte data)
Definition: DyeColor.java:175
static DyeColor org.bukkit.DyeColor.getByDyeData ( final byte  data)
static

Gets the DyeColor with the given dye data value.

Parameters
dataDye data value to fetch
Returns
The DyeColor representing the given value, or null if it doesn't exist
See also
#getByWoolData(byte)
Deprecated:
Magic value

Definition at line 193 of file DyeColor.java.

Referenced by org.bukkit.material.Dye.getColor().

193  {
194  int i = 0xff & data;
195  if (i >= BY_DYE_DATA.length) {
196  return null;
197  }
198  return BY_DYE_DATA[i];
199  }
static DyeColor org.bukkit.DyeColor.getByFireworkColor ( final Color  color)
static

Gets the DyeColor with the given firework color value.

Parameters
colorColor value to get dye by
Returns
The DyeColor representing the given value, or null if it doesn't exist

Definition at line 219 of file DyeColor.java.

219  {
220  return BY_FIREWORK.get(color);
221  }
static DyeColor org.bukkit.DyeColor.getByWoolData ( final byte  data)
static

Gets the DyeColor with the given wool data value.

Parameters
dataWool data value to fetch
Returns
The DyeColor representing the given value, or null if it doesn't exist
See also
#getByDyeData(byte)
Deprecated:
Magic value

Definition at line 175 of file DyeColor.java.

Referenced by org.bukkit.material.Wool.getColor().

175  {
176  int i = 0xff & data;
177  if (i >= BY_WOOL_DATA.length) {
178  return null;
179  }
180  return BY_WOOL_DATA[i];
181  }
Color org.bukkit.DyeColor.getColor ( )

Gets the color that this dye represents.

Returns
The Color that this dye represents

Definition at line 136 of file DyeColor.java.

136  {
137  return color;
138  }
byte org.bukkit.DyeColor.getData ( )

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

Returns
A byte containing the (wool) data value of this color
Deprecated:
The name is misleading. It would imply Material#INK_SACK but uses Material#WOOL
See also
getWoolData()
getDyeData()

Definition at line 103 of file DyeColor.java.

103  {
104  return getWoolData();
105  }
byte org.bukkit.DyeColor.getDyeData ( )

Gets the associated dye data value representing this color.

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

Definition at line 127 of file DyeColor.java.

Referenced by org.bukkit.material.Dye.setColor().

127  {
128  return dyeData;
129  }
Color org.bukkit.DyeColor.getFireworkColor ( )

Gets the firework color that this dye represents.

Returns
The Color that this dye represents

Definition at line 145 of file DyeColor.java.

145  {
146  return firework;
147  }
byte org.bukkit.DyeColor.getWoolData ( )

Gets the associated wool data value representing this color.

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

Definition at line 115 of file DyeColor.java.

Referenced by org.bukkit.material.Wool.setColor().

115  {
116  return woolData;
117  }

Member Data Documentation

org.bukkit.DyeColor.BLACK =(0xF, 0x0, Color.fromRGB(0x191919), Color.fromRGB(0x1E1B1B))

Represents black dye.

Definition at line 75 of file DyeColor.java.

org.bukkit.DyeColor.BLUE =(0xB, 0x4, Color.fromRGB(0x334CB2), Color.fromRGB(0x253192))

Represents blue dye.

Definition at line 59 of file DyeColor.java.

org.bukkit.DyeColor.BROWN =(0xC, 0x3, Color.fromRGB(0x664C33), Color.fromRGB(0x51301A))

Represents brown dye.

Definition at line 63 of file DyeColor.java.

org.bukkit.DyeColor.CYAN =(0x9, 0x6, Color.fromRGB(0x4C7F99), Color.fromRGB(0x287697))

Represents cyan dye.

Definition at line 51 of file DyeColor.java.

org.bukkit.DyeColor.GRAY =(0x7, 0x8, Color.fromRGB(0x4C4C4C), Color.fromRGB(0x434343))

Represents gray dye.

Definition at line 43 of file DyeColor.java.

org.bukkit.DyeColor.GREEN =(0xD, 0x2, Color.fromRGB(0x667F33), Color.fromRGB(0x3B511A))

Represents green dye.

Definition at line 67 of file DyeColor.java.

org.bukkit.DyeColor.LIGHT_BLUE =(0x3, 0xC, Color.fromRGB(0x6699D8), Color.fromRGB(0x6689D3))

Represents light blue dye.

Definition at line 27 of file DyeColor.java.

org.bukkit.DyeColor.LIME =(0x5, 0xA, Color.fromRGB(0x7FCC19), Color.fromRGB(0x41CD34))

Represents lime dye.

Definition at line 35 of file DyeColor.java.

org.bukkit.DyeColor.MAGENTA =(0x2, 0xD, Color.fromRGB(0xB24CD8), Color.fromRGB(0xC354CD))

Represents magenta dye.

Definition at line 23 of file DyeColor.java.

org.bukkit.DyeColor.ORANGE =(0x1, 0xE, Color.fromRGB(0xD87F33), Color.fromRGB(0xEB8844))

Represents orange dye.

Definition at line 19 of file DyeColor.java.

org.bukkit.DyeColor.PINK =(0x6, 0x9, Color.fromRGB(0xF27FA5), Color.fromRGB(0xD88198))

Represents pink dye.

Definition at line 39 of file DyeColor.java.

org.bukkit.DyeColor.PURPLE =(0xA, 0x5, Color.fromRGB(0x7F3FB2), Color.fromRGB(0x7B2FBE))

Represents purple dye.

Definition at line 55 of file DyeColor.java.

org.bukkit.DyeColor.RED =(0xE, 0x1, Color.fromRGB(0x993333), Color.fromRGB(0xB3312C))

Represents red dye.

Definition at line 71 of file DyeColor.java.

org.bukkit.DyeColor.SILVER =(0x8, 0x7, Color.fromRGB(0x999999), Color.fromRGB(0xABABAB))

Represents silver dye.

Definition at line 47 of file DyeColor.java.

org.bukkit.DyeColor.WHITE =(0x0, 0xF, Color.WHITE, Color.fromRGB(0xF0F0F0))

Represents white dye.

Definition at line 15 of file DyeColor.java.

org.bukkit.DyeColor.YELLOW =(0x4, 0xB, Color.fromRGB(0xE5E533), Color.fromRGB(0xDECF2A))

Represents yellow dye.

Definition at line 31 of file DyeColor.java.


The documentation for this enum was generated from the following file: