类 ColorParser

java.lang.Object
cn.lunadeer.dominion.utils.ColorParser

public class ColorParser extends Object
Utility class for parsing color codes in strings.
  • 构造器详细资料

    • ColorParser

      public ColorParser()
  • 方法详细资料

    • getComponentType

      public static net.kyori.adventure.text.TextComponent getComponentType(String text)
      Converts a string with color codes into a TextComponent.
      参数:
      text - the string with color codes
      返回:
      the TextComponent with the parsed colors
    • getBukkitType

      public static String getBukkitType(String text)
      Converts a string with color codes into a Bukkit-compatible color string.
      参数:
      text - the string with color codes
      返回:
      the Bukkit-compatible color string
    • getPlainText

      public static String getPlainText(String text)
      Removes color codes from a string, returning plain text.
      参数:
      text - the string with color codes
      返回:
      the plain text string