Class InvalidSyntaxException

All Implemented Interfaces:
Serializable

@API(status=STABLE) public class InvalidSyntaxException extends CommandParseException
Exception sent when a command sender inputs invalid command syntax
See Also:
  • Constructor Details

    • InvalidSyntaxException

      @API(status=INTERNAL, consumers="cloud.commandframework.*") public InvalidSyntaxException(@NonNull String correctSyntax, @NonNull Object commandSender, @NonNull List<@NonNull CommandArgument<?,?>> currentChain)
      Create a new invalid syntax exception instance
      Parameters:
      correctSyntax - Expected syntax
      commandSender - Sender that sent the command
      currentChain - Chain leading up to issue
  • Method Details

    • getCorrectSyntax

      public @NonNull String getCorrectSyntax()
      Get the correct syntax of the command
      Returns:
      Correct command syntax
    • getMessage

      public final String getMessage()
      Overrides:
      getMessage in class Throwable