Package com.booksaw.betterTeams
Class CommandResponse
java.lang.Object
com.booksaw.betterTeams.CommandResponse
This class is used to the the response for a command, this tracks if the
command was successful and what the message being sent to the user should be
- Since:
- 3.1.0
- Author:
- booksaw
-
Constructor Summary
ConstructorsConstructorDescriptionCommandResponse
(boolean success) Used when no message should be sent to the userCommandResponse
(boolean success, Message message) Used when you want to send a more complex message to the userCommandResponse
(boolean success, String message) Used for a basic successful commandCommandResponse
(Message message) Used when you want to send a more complex message to the userCommandResponse
(String message) This method assumes that the command is not a success -
Method Summary
Modifier and TypeMethodDescriptionvoid
sendResponseMessage
(org.bukkit.command.CommandSender sender) This method is used to send the message which has been set by the commandboolean
-
Constructor Details
-
CommandResponse
Used for a basic successful command- Parameters:
success
- if the command was successfulmessage
- the reference for the message to send to the user
-
CommandResponse
This method assumes that the command is not a success- Parameters:
message
- the message to send to the user
-
CommandResponse
Used when you want to send a more complex message to the user- Parameters:
success
- if the command was successfulmessage
- the message to send to the user
-
CommandResponse
Used when you want to send a more complex message to the user- Parameters:
message
- the message to send to the user
-
CommandResponse
public CommandResponse(boolean success) Used when no message should be sent to the user- Parameters:
success
- if the command was a success or not
-
-
Method Details
-
sendResponseMessage
public void sendResponseMessage(org.bukkit.command.CommandSender sender) This method is used to send the message which has been set by the command- Parameters:
sender
- the player who sent the command
-
wasSuccessful
public boolean wasSuccessful()- Returns:
- if the command was successful
-