Package net.storm.sdk.utils
Class MessageUtils
java.lang.Object
net.storm.sdk.utils.MessageUtils
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddMessage(String message) Sends a highlighted console message.static voidaddMessage(String message, Color color) Sends a console message with a custom color.static voidaddMessage(String message, Color color, net.runelite.api.ChatMessageType messageType) Sends a message to the chat with a custom color and message type.static voidaddMessage(String message, net.runelite.api.ChatMessageType messageType) Sends a message to the chat with a specified message type.static voidaddMessage(String message, net.runelite.client.chat.ChatColorType colorType) Sends a console message with a specified color type.static voidaddMessage(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.
-
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 displaycolorType- 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 displaycolor- the custom color for the messagemessageType- the type of chat message (e.g., CONSOLE, GAMEMESSAGE)
-
addMessage
Sends a message to the chat with a specified message type.Uses the HIGHLIGHT color type by default.
- Parameters:
message- the message text to displaymessageType- the type of chat message (e.g., CONSOLE, GAMEMESSAGE)
-
addMessage
Sends a console message with a specified color type.- Parameters:
message- the message text to displaycolorType- the RuneLite chat color type (e.g., HIGHLIGHT, NORMAL)
-
addMessage
Sends a console message with a custom color.- Parameters:
message- the message text to displaycolor- the custom color for the message
-
addMessage
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
-