Class ComponentUtils

java.lang.Object
dev.selena.luacore.utils.text.ComponentUtils

public class ComponentUtils extends Object
  • Constructor Details

    • ComponentUtils

      public ComponentUtils()
  • Method Details

    • color

      public static net.kyori.adventure.text.Component color(String input)
      Converts a string to an Adventure Component with MiniMessage. This method supports Iridium's gradient, rainbow, and solid color formats too.
      Parameters:
      input - the string to convert
      Returns:
      a MiniMessage component with the converted colors
    • color

      public static List<net.kyori.adventure.text.Component> color(List<String> strings)
      Converts a list of strings to a list of Adventure Components with MiniMessage. This method supports Iridium's gradient, rainbow, and solid color formats too.
      Parameters:
      strings - the list of strings to convert
      Returns:
      a list of MiniMessage components with the converted colors
    • convertFromIridium

      public static String convertFromIridium(String input)
      Converts a string from Iridium's color format to MiniMessage format. This method supports gradient, rainbow, and solid color formats.
      Parameters:
      input - the string to convert
      Returns:
      the converted string in MiniMessage format