Package org.geysermc.geyser.text
Class ChatColor
java.lang.Object
org.geysermc.geyser.text.ChatColor
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic charstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringstripColors(String message)Remove all colour formatting tags from a messagestatic StringConvert chat colour codes to terminal colourstranslateAlternateColorCodes(char color, String message)
-
Field Details
-
ESCAPE
public static final char ESCAPE- See Also:
- Constant Field Values
-
BLACK
- See Also:
- Constant Field Values
-
DARK_BLUE
- See Also:
- Constant Field Values
-
DARK_GREEN
- See Also:
- Constant Field Values
-
DARK_AQUA
- See Also:
- Constant Field Values
-
DARK_RED
- See Also:
- Constant Field Values
-
DARK_PURPLE
- See Also:
- Constant Field Values
-
GOLD
- See Also:
- Constant Field Values
-
GRAY
- See Also:
- Constant Field Values
-
DARK_GRAY
- See Also:
- Constant Field Values
-
BLUE
- See Also:
- Constant Field Values
-
GREEN
- See Also:
- Constant Field Values
-
AQUA
- See Also:
- Constant Field Values
-
RED
- See Also:
- Constant Field Values
-
LIGHT_PURPLE
- See Also:
- Constant Field Values
-
YELLOW
- See Also:
- Constant Field Values
-
WHITE
- See Also:
- Constant Field Values
-
OBFUSCATED
- See Also:
- Constant Field Values
-
BOLD
- See Also:
- Constant Field Values
-
STRIKETHROUGH
- See Also:
- Constant Field Values
-
UNDERLINE
- See Also:
- Constant Field Values
-
ITALIC
- See Also:
- Constant Field Values
-
RESET
- See Also:
- Constant Field Values
-
-
Constructor Details
-
ChatColor
public ChatColor()
-
-
Method Details
-
toANSI
Convert chat colour codes to terminal colours- Parameters:
string- The text to replace colours for- Returns:
- A string ready for terminal printing
-
translateAlternateColorCodes
-
stripColors
Remove all colour formatting tags from a message- Parameters:
message- Message to remove colour tags from- Returns:
- The sanitised message
-