Class GeneralCommandException

All Implemented Interfaces:
Serializable

public class GeneralCommandException extends CommandException
A general command exception that can be used for any error message.
See Also:
  • Constructor Details

    • GeneralCommandException

      public GeneralCommandException(@Nonnull Message message)
      Default Constructor for a GeneralCommandException instance.
      Parameters:
      message - The message associated with this exception.
  • Method Details

    • sendTranslatedMessage

      public void sendTranslatedMessage(@Nonnull CommandSender sender)
      Description copied from class: CommandException
      Sends a translated message to the given sender.
      Specified by:
      sendTranslatedMessage in class CommandException
      Parameters:
      sender - The sender to send the message to.
    • getMessageText

      @Nullable public String getMessageText()
      Gets the message text from this exception.
      Returns:
      The message text, or null if the message cannot be converted to text.