Skip to content

Developer: Command Response

zoweb edited this page Jun 12, 2017 · 1 revision

The CommandResponse class allows a user to generate and use responses to commands. This class allows the module to set the response message of a command, including messages sent to the player, console and broadcasts.

Using the static CommandResponse.parseColours(String message) method, colours using the ampersand (&) symbol will be parsed to use colours in the console and in chat.

The static CommandResponse.broadcastMessage(Server server, String message) will broadcast a message to every player currently online on a server, and adding a third Player argument will set that player to not be broadcast to.

Using the set[Player,Console,Broadcast]Message(String message) methods, the player, console or broadcastable messages. The String get[Player,...]Message() version of this method will return the message set by set[...]Message(). The Boolean use[Player,...]Message() method will return if a message exists to be sent.

The send(Player player, Server server) method allows automatic sending of the player, console and broadcast messages.

Are you a developer? Check out the "Developer" pages above.

Are you a user? Check out the "User" pages above.

Clone this wiki locally