ToolSet / com.zndevs.toolset.tools / CommandResponse

CommandResponse

class CommandResponse

Tools to help with responses from commands

Constructors

<init> CommandResponse()
Tools to help with responses from commands

Properties

broadcastMessage var broadcastMessage: String?
The message to be broadcasted
consoleMessage var consoleMessage: String?
The message to be sent to the console
playerMessage var playerMessage: String?
The message sent to the executing player

Functions

send fun send(player: CommandSender, server: Server = Bukkit.getServer()): Unit
Sends all messages if they are required
useBroadcastMessage fun useBroadcastMessage(): Boolean
Check if the message to be broadcasted exists
useConsoleMessage fun useConsoleMessage(): Boolean
Check if the message to be sent to the console exists
usePlayerMessage fun usePlayerMessage(): Boolean
Check if the message to send exists

Companion Object Functions

broadcastMessage fun broadcastMessage(server: Server, message: String?): Unit
Broadcasts a message to every online playerfun broadcastMessage(server: Server, message: String?, player: Player): Unit
Broadcasts a message to every online player except for the one parsed into the third argument
getMessage fun getMessage(messageConfig: ConfigurationSection, messageConfigPath: String, defaultMessage: String): String
Gets a message from the configuration
parseColours fun parseColours(message: String?): String?
Parses colours in messages using the ‘&’ symbol