Package org.bukkit.map
Class MapPalette
java.lang.Object
org.bukkit.map.MapPalette
Represents the palette that map items use.
 
These fields are hee base color ranges. Each entry corresponds to four colors of varying shades with values entry to entry + 3.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic interfaceHolds cached information for matching map colors of a given RBG color.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final byteDeprecated.Magic valuestatic final byteDeprecated.Magic valuestatic final byteDeprecated.Magic valuestatic final byteDeprecated.Magic valuestatic final byteDeprecated.Magic valuestatic final byteDeprecated.Magic valuestatic final byteDeprecated.Magic valuestatic final byteDeprecated.Magic valuestatic final byteDeprecated.Magic valuestatic final byteDeprecated.Magic valuestatic final byteDeprecated.Magic valuestatic final byteDeprecated.Magic valuestatic final byteDeprecated.Magic valuestatic final byteDeprecated.Magic value
- 
Method SummaryModifier and TypeMethodDescriptionstatic ColorgetColor(byte index) Deprecated.Magic valuestatic byte[]imageToBytes(Image image) Deprecated.Magic valuestatic bytematchColor(int r, int g, int b) Deprecated.Magic valuestatic bytematchColor(Color color) Deprecated.Magic valuestatic BufferedImageresizeImage(Image image) Resize an image to 128x128.static voidsetMapColorCache(MapPalette.MapColorCache mapColorCache) Sets the given MapColorCache.
- 
Field Details- 
TRANSPARENTDeprecated.Magic value- See Also:
 
- 
LIGHT_GREENDeprecated.Magic value- See Also:
 
- 
LIGHT_BROWNDeprecated.Magic value- See Also:
 
- 
GRAY_1Deprecated.Magic value- See Also:
 
- 
REDDeprecated.Magic value- See Also:
 
- 
PALE_BLUEDeprecated.Magic value- See Also:
 
- 
GRAY_2Deprecated.Magic value- See Also:
 
- 
DARK_GREENDeprecated.Magic value- See Also:
 
- 
WHITEDeprecated.Magic value- See Also:
 
- 
LIGHT_GRAYDeprecated.Magic value- See Also:
 
- 
BROWNDeprecated.Magic value- See Also:
 
- 
DARK_GRAYDeprecated.Magic value- See Also:
 
- 
BLUEDeprecated.Magic value- See Also:
 
- 
DARK_BROWNDeprecated.Magic value- See Also:
 
 
- 
- 
Method Details- 
resizeImageResize an image to 128x128.- Parameters:
- image- The image to resize.
- Returns:
- The resized image.
 
- 
imageToBytesDeprecated.Magic valueConvert an Image to a byte[] using the palette.- Parameters:
- image- The image to convert.
- Returns:
- A byte[] containing the pixels of the image.
 
- 
matchColorDeprecated.Magic valueGet the index of the closest matching color in the palette to the given color.- Parameters:
- r- The red component of the color.
- g- The green component of the color.
- b- The blue component of the color.
- Returns:
- The index in the palette.
 
- 
matchColorDeprecated.Magic valueGet the index of the closest matching color in the palette to the given color.- Parameters:
- color- The Color to match.
- Returns:
- The index in the palette.
 
- 
getColorDeprecated.Magic valueGet the value of the given color in the palette.- Parameters:
- index- The index in the palette.
- Returns:
- The Color of the palette entry.
 
- 
setMapColorCacheSets the given MapColorCache.- Parameters:
- mapColorCache- The map color cache to set
 
 
-