Class MessageUtils

java.lang.Object
net.storm.sdk.utils.MessageUtils

public class MessageUtils extends Object
Utility class for sending messages to the in-game chat.

This class provides methods for displaying messages in the game's chat box with customizable colors and message types. Messages are queued through the RuneLite chat message manager.

All messages require the player to be logged in; they will be silently ignored if called while logged out.

See Also:
  • ChatMessageType
  • ChatColorType
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    addMessage(String message)
    Sends a highlighted console message.
    static void
    addMessage(String message, Color color)
    Sends a console message with a custom color.
    static void
    addMessage(String message, Color color, net.runelite.api.ChatMessageType messageType)
    Sends a message to the chat with a custom color and message type.
    static void
    addMessage(String message, net.runelite.api.ChatMessageType messageType)
    Sends a message to the chat with a specified message type.
    static void
    addMessage(String message, net.runelite.client.chat.ChatColorType colorType)
    Sends a console message with a specified color type.
    static void
    addMessage(String message, net.runelite.client.chat.ChatColorType colorType, net.runelite.api.ChatMessageType messageType)
    Sends a message to the chat with specified color type and message type.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MessageUtils

      public MessageUtils()
  • Method Details

    • addMessage

      public static void addMessage(String message, net.runelite.client.chat.ChatColorType colorType, net.runelite.api.ChatMessageType messageType)
      Sends a message to the chat with specified color type and message type.
      Parameters:
      message - the message text to display
      colorType - the RuneLite chat color type (e.g., HIGHLIGHT, NORMAL)
      messageType - the type of chat message (e.g., CONSOLE, GAMEMESSAGE)
    • addMessage

      public static void addMessage(String message, Color color, net.runelite.api.ChatMessageType messageType)
      Sends a message to the chat with a custom color and message type.
      Parameters:
      message - the message text to display
      color - the custom color for the message
      messageType - the type of chat message (e.g., CONSOLE, GAMEMESSAGE)
    • addMessage

      public static void addMessage(String message, net.runelite.api.ChatMessageType messageType)
      Sends a message to the chat with a specified message type.

      Uses the HIGHLIGHT color type by default.

      Parameters:
      message - the message text to display
      messageType - the type of chat message (e.g., CONSOLE, GAMEMESSAGE)
    • addMessage

      public static void addMessage(String message, net.runelite.client.chat.ChatColorType colorType)
      Sends a console message with a specified color type.
      Parameters:
      message - the message text to display
      colorType - the RuneLite chat color type (e.g., HIGHLIGHT, NORMAL)
    • addMessage

      public static void addMessage(String message, Color color)
      Sends a console message with a custom color.
      Parameters:
      message - the message text to display
      color - the custom color for the message
    • addMessage

      public static void addMessage(String message)
      Sends a highlighted console message.

      This is the simplest form - displays the message with highlight color in the console message area.

      Parameters:
      message - the message text to display