Class Chat

java.lang.Object
org.rspeer.game.Chat

public class Chat extends Object
Provides operations related to game chat
  • Constructor Details

    • Chat

      public Chat()
  • Method Details

    • sendPublic

      public static void sendPublic(String message)
      Sends a public chat message.

      This method uses the game's script executor to dispatch a public chat message to the in-game chat system.

      Parameters:
      message - the message to send publicly
      Throws:
      IllegalArgumentException - if the message is null
    • sendPrivate

      public static void sendPrivate(String target, String message)
      Sends a private message to a specific target player.

      This method uses the game's script executor to send a private message to the specified target. The message will only be visible to the recipient.

      Parameters:
      target - the name of the target player to whom the message will be sent
      message - the message to send privately
      Throws:
      IllegalArgumentException - if the target or message is null or empty