Class MessageUtil

java.lang.Object
com.hypixel.hytale.server.core.util.MessageUtil

public class MessageUtil extends Object
Since:
27/3/17.
Version:
1.0
  • Constructor Details

    • MessageUtil

      public MessageUtil()
  • Method Details

    • toAnsiString

      public static org.jline.utils.AttributedString toAnsiString(@Nonnull Message message)
    • hexToStyle

      public static org.jline.utils.AttributedStyle hexToStyle(@Nonnull String str)
    • containsControlCharacters

      public static boolean containsControlCharacters(@Nonnull String message)
      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

      @Nullable public static String formatMessageToPlainString(@Nullable FormattedMessage msg)
      Converts a FormattedMessage to a plain string for logging and simple display. For rich formatted display, the FormattedMessage should be used directly.
    • sendSuccessReply

      @Deprecated public static void sendSuccessReply(@Nonnull PlayerRef playerRef, int token)
      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)