Class CommandParseException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ArgumentParseException, InvalidCommandSenderException, InvalidSyntaxException, NoPermissionException, NoSuchCommandException

@API(status=STABLE) public class CommandParseException extends IllegalArgumentException
Exception thrown when parsing user input into a command
See Also:
  • Constructor Details

    • CommandParseException

      @API(status=INTERNAL, consumers="cloud.commandframework.*") protected CommandParseException(@NonNull Object commandSender, @NonNull List<CommandArgument<?,?>> currentChain)
      Construct a new command parse exception
      Parameters:
      commandSender - Sender who executed the command
      currentChain - Chain leading up to the exception
  • Method Details

    • getCommandSender

      public @NonNull Object getCommandSender()
      Get the command sender
      Returns:
      Command sender
    • getCurrentChain

      public @NonNull List<@NonNull CommandArgument<?,?>> getCurrentChain()
      Get the command chain leading up to the exception
      Returns:
      Unmodifiable list of command arguments