Class CommandErrorException

All Implemented Interfaces:
Serializable

public class CommandErrorException extends SendableException
Represents a command error, for example when an invalid value is returned, a condition is violated, or an illegal value is inputted, and validated through a parameter validator.

This exception should be used to directly transfer error messages to the CommandActor, and is always used in command-fail contexts. For exceptions that only reply to the actor, see SendMessageException.

See Also:
  • Constructor Details

    • CommandErrorException

      public CommandErrorException(String message, Object... arguments)
      Constructs a new CommandErrorException with an inferred actor
      Parameters:
      message - Message to send
  • Method Details

    • sendTo

      public void sendTo(@NotNull @NotNull CommandActor actor)
      Sends the message to the given actor
      Specified by:
      sendTo in class SendableException
      Parameters:
      actor - Actor to send to