Class InvalidCommandSenderException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
cloud.commandframework.exceptions.CommandParseException
cloud.commandframework.exceptions.InvalidCommandSenderException
- All Implemented Interfaces:
Serializable
Exception thrown when an invalid command sender tries to execute a command
- See Also:
- Serialized Form
-
Constructor Summary
ConstructorDescriptionInvalidCommandSenderException(@NonNull Object commandSender, @NonNull Class<?> requiredSender, @NonNull List<@NonNull CommandArgument<?,?>> currentChain)
Construct a new command parse exceptionInvalidCommandSenderException(@NonNull Object commandSender, @NonNull Class<?> requiredSender, @NonNull List<@NonNull CommandArgument<?,?>> currentChain, @Nullable Command<?> command)
Construct a new command parse exception -
Method Summary
Methods inherited from class cloud.commandframework.exceptions.CommandParseException
getCommandSender, getCurrentChain
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InvalidCommandSenderException
public InvalidCommandSenderException(@NonNull Object commandSender, @NonNull Class<?> requiredSender, @NonNull List<@NonNull CommandArgument<?,?>> currentChain)Construct a new command parse exception- Parameters:
commandSender
- Sender who executed the commandrequiredSender
- The sender type that is requiredcurrentChain
- Chain leading up to the exception
-
InvalidCommandSenderException
public InvalidCommandSenderException(@NonNull Object commandSender, @NonNull Class<?> requiredSender, @NonNull List<@NonNull CommandArgument<?,?>> currentChain, @Nullable Command<?> command)Construct a new command parse exception- Parameters:
commandSender
- Sender who executed the commandrequiredSender
- The sender type that is requiredcurrentChain
- Chain leading up to the exceptioncommand
- Command- Since:
- 1.4.0
-
-
Method Details
-
getRequiredSender
Get the required sender type- Returns:
- Required sender type
-
getMessage
- Overrides:
getMessage
in classThrowable
-
getCommand
Get the Command which the sender is invalid for- Returns:
- Command
- Since:
- 1.4.0
-