Contents
Class MessageUtil
java.lang.Object
com.hypixel.hytale.server.core.util.MessageUtil
- Since:
- 27/3/17.
- Version:
- 1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancontainsControlCharacters(String message) Identifies whether a string sequence contains ANSI control characters.static StringConverts aFormattedMessageto a plain string for logging and simple display.static StringformatText(String text, Map<String, ParamValue> params, Map<String, FormattedMessage> messageParams) static org.jline.utils.AttributedStylehexToStyle(String str) static voidsendFailureReply(PlayerRef playerRef, int token, Message message) Deprecated.static voidsendSuccessReply(PlayerRef playerRef, int token) Deprecated.static voidsendSuccessReply(PlayerRef playerRef, int token, Message message) Deprecated.static org.jline.utils.AttributedStringtoAnsiString(Message message)
-
Constructor Details
-
MessageUtil
public MessageUtil()
-
-
Method Details
-
toAnsiString
-
hexToStyle
-
containsControlCharacters
Identifies whether a string sequence contains ANSI control characters.- Parameters:
message- the string to validate against various ANSI control characters.- Returns:
- a boolean representing whether the message contains ANSI control characters.
-
formatMessageToPlainString
Converts aFormattedMessageto a plain string for logging and simple display. For rich formatted display, the FormattedMessage should be used directly. -
sendSuccessReply
Deprecated. -
sendSuccessReply
@Deprecated public static void sendSuccessReply(@Nonnull PlayerRef playerRef, int token, @Nullable Message message) Deprecated. -
sendFailureReply
@Deprecated public static void sendFailureReply(@Nonnull PlayerRef playerRef, int token, @Nonnull Message message) Deprecated. -
formatText
@Nonnull public static String formatText(String text, @Nullable Map<String, ParamValue> params, @Nullable Map<String, FormattedMessage> messageParams)
-