Class BossBarUtils

java.lang.Object
org.skriptlang.skript.bukkit.bossbar.BossBarUtils

public final class BossBarUtils extends Object
A utility class for boss bars to help with getting RGB from SkriptColor and rounding an RGB to the nearest BarColor.
  • Method Details

    • rgbFromBarColor

      public static Color rgbFromBarColor(org.bukkit.boss.BarColor color)
      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

      @Nullable public static org.bukkit.boss.BarColor nearest(Color color)
      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