类 ColorParser
java.lang.Object
cn.lunadeer.dominion.utils.ColorParser
Utility class for parsing color codes in strings.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static StringgetBukkitType(String text) Converts a string with color codes into a Bukkit-compatible color string.static net.kyori.adventure.text.TextComponentgetComponentType(String text) Converts a string with color codes into a TextComponent.static StringgetPlainText(String text) Removes color codes from a string, returning plain text.
-
构造器详细资料
-
ColorParser
public ColorParser()
-
-
方法详细资料
-
getComponentType
Converts a string with color codes into a TextComponent.- 参数:
text- the string with color codes- 返回:
- the TextComponent with the parsed colors
-
getBukkitType
Converts a string with color codes into a Bukkit-compatible color string.- 参数:
text- the string with color codes- 返回:
- the Bukkit-compatible color string
-
getPlainText
Removes color codes from a string, returning plain text.- 参数:
text- the string with color codes- 返回:
- the plain text string
-