程序包 org.bukkit.map
接口 MapPalette.MapColorCache
- 封闭类:
- MapPalette
public static interface MapPalette.MapColorCache
保存用于匹配给定RGB颜色的缓存信息。
-
方法概要
修饰符和类型方法说明booleanisCached()如果MapColorCache有缓存值则返回true,否则返回false。bytematchColor(@NotNull Color color) 已过时。魔法值
-
方法详细资料
-
isCached
boolean isCached()如果MapColorCache有缓存值则返回true,否则返回false。 可能返回false的情况是缓存尚未构建。原文: Returns true if the MapColorCache has values cached, if not it will return false. A case where it might return false is when the cache is not build jet.
- 返回:
- 如果此MapColorCache有缓存值则返回true,否则返回false。
-
matchColor
已过时。魔法值获取调色板中与给定颜色最匹配的缓存索引。原文: Get the cached index of the closest matching color in the palette to the given color.
- 参数:
color- 要匹配的Color对象。- 返回:
- 调色板中的索引。
- 抛出:
IllegalStateException- 如果isCached()返回false。
-