Class BossBarUtils
java.lang.Object
org.skriptlang.skript.bukkit.bossbar.BossBarUtils
A utility class for boss bars to help with getting RGB from SkriptColor and rounding an RGB to the nearest BarColor.
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.boss.BarColorGets the nearest bossbar color from a skript colorstatic ColorrgbFromBarColor(org.bukkit.boss.BarColor color) Gets an RGB from a bar color cause well bukkit doesn't have it (invalid input: '&' reasonably so)
-
Method Details
-
rgbFromBarColor
Gets an RGB from a bar color cause well bukkit doesn't have it (invalid input: '&' reasonably so)- Parameters:
color- the bar color to get the RGB color for- Returns:
- the corresponding RGB color, or null
-
nearest
Gets the nearest bossbar color from a skript color- Parameters:
color- the RGB color to find the nearest bar color for- Returns:
- the nearest bar color, or null if no close enough match is found
-