Class CommandResponse

java.lang.Object
com.booksaw.betterTeams.CommandResponse

public class CommandResponse extends Object
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 Details

    • CommandResponse

      public CommandResponse(boolean success, String message)
      Used for a basic successful command
      Parameters:
      success - if the command was successful
      message - the reference for the message to send to the user
    • CommandResponse

      public CommandResponse(String message)
      This method assumes that the command is not a success
      Parameters:
      message - the message to send to the user
    • CommandResponse

      public CommandResponse(boolean success, Message message)
      Used when you want to send a more complex message to the user
      Parameters:
      success - if the command was successful
      message - the message to send to the user
    • CommandResponse

      public CommandResponse(Message message)
      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