Package net.minestom.server.chat
Class ChatParser
java.lang.Object
net.minestom.server.chat.ChatParser
public final class ChatParser
extends java.lang.Object
Class used to convert JSON string to proper chat message representation.
-
Field Summary
Fields Modifier and Type Field Description static char
COLOR_CHAR
-
Constructor Summary
Constructors Constructor Description ChatParser()
-
Method Summary
Modifier and Type Method Description static ColoredText
toColoredText(java.lang.String json)
Converts a simple colored message json (text/color) to aColoredText
.
-
Field Details
-
COLOR_CHAR
public static final char COLOR_CHAR- See Also:
- Constant Field Values
-
-
Constructor Details
-
ChatParser
public ChatParser()
-
-
Method Details
-
toColoredText
Converts a simple colored message json (text/color) to aColoredText
.- Parameters:
json
- the json containing the text and color- Returns:
- a
ColoredText
representing the text
-