Package org.rspeer.game
Class Chat
- java.lang.Object
-
- org.rspeer.game.Chat
-
public class Chat extends Object
Provides operations related to game chat
-
-
Constructor Summary
Constructors Constructor Description Chat()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
sendPrivate(String target, String message)
Sends a private message to a specific target player.static void
sendPublic(String message)
Sends a public chat message.
-
-
-
Method Detail
-
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 isnull
-
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 sentmessage
- the message to send privately- Throws:
IllegalArgumentException
- if the target or message isnull
or empty
-
-