程序包 org.bukkit.map
类 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.
- 
嵌套类概要嵌套类修饰符和类型类说明static interfaceHolds cached information for matching map colors of a given RBG color.
- 
字段概要字段修饰符和类型字段说明static final byte已过时。Magic valuestatic final byte已过时。Magic valuestatic final byte已过时。Magic valuestatic final byte已过时。Magic valuestatic final byte已过时。Magic valuestatic final byte已过时。Magic valuestatic final byte已过时。Magic valuestatic final byte已过时。Magic valuestatic final byte已过时。Magic valuestatic final byte已过时。Magic valuestatic final byte已过时。Magic valuestatic final byte已过时。Magic valuestatic final byte已过时。Magic valuestatic final byte已过时。Magic value
- 
方法概要修饰符和类型方法说明getColor(byte index) 已过时。Magic valuestatic @org.jetbrains.annotations.NotNull byte[]imageToBytes(@NotNull Image image) 已过时。Magic valuestatic bytematchColor(int r, int g, int b) 已过时。Magic valuestatic bytematchColor(@NotNull Color color) 已过时。Magic valuestatic @NotNull BufferedImageresizeImage(@Nullable Image image) Resize an image to 128x128.static voidsetMapColorCache(@NotNull MapPalette.MapColorCache mapColorCache) Sets the given MapColorCache.
- 
字段详细资料- 
TRANSPARENT已过时。Magic value- 另请参阅:
 
- 
LIGHT_GREEN已过时。Magic value- 另请参阅:
 
- 
LIGHT_BROWN已过时。Magic value- 另请参阅:
 
- 
GRAY_1已过时。Magic value- 另请参阅:
 
- 
RED已过时。Magic value- 另请参阅:
 
- 
PALE_BLUE已过时。Magic value- 另请参阅:
 
- 
GRAY_2已过时。Magic value- 另请参阅:
 
- 
DARK_GREEN已过时。Magic value- 另请参阅:
 
- 
WHITE已过时。Magic value- 另请参阅:
 
- 
LIGHT_GRAY已过时。Magic value- 另请参阅:
 
- 
BROWN已过时。Magic value- 另请参阅:
 
- 
DARK_GRAY已过时。Magic value- 另请参阅:
 
- 
BLUE已过时。Magic value- 另请参阅:
 
- 
DARK_BROWN已过时。Magic value- 另请参阅:
 
 
- 
- 
方法详细资料- 
resizeImageResize an image to 128x128.- 参数:
- image- The image to resize.
- 返回:
- The resized image.
 
- 
imageToBytes@Deprecated(since="1.6.2") @NotNull public static @org.jetbrains.annotations.NotNull byte[] imageToBytes(@NotNull @NotNull Image image) 已过时。Magic valueConvert an Image to a byte[] using the palette.- 参数:
- image- The image to convert.
- 返回:
- A byte[] containing the pixels of the image.
 
- 
matchColor已过时。Magic valueGet the index of the closest matching color in the palette to the given color.- 参数:
- r- The red component of the color.
- b- The blue component of the color.
- g- The green component of the color.
- 返回:
- The index in the palette.
 
- 
matchColor已过时。Magic valueGet the index of the closest matching color in the palette to the given color.- 参数:
- color- The Color to match.
- 返回:
- The index in the palette.
 
- 
getColor已过时。Magic valueGet the value of the given color in the palette.- 参数:
- index- The index in the palette.
- 返回:
- The Color of the palette entry.
 
- 
setMapColorCacheSets the given MapColorCache.- 参数:
- mapColorCache- The map color cache to set
 
 
-