Package org.incendo.cloud.exception
Class InvalidCommandSenderException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
org.incendo.cloud.exception.CommandParseException
org.incendo.cloud.exception.InvalidCommandSenderException
- All Implemented Interfaces:
Serializable
Exception thrown when an invalid command sender tries to execute a command
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInvalidCommandSenderException(@NonNull Object commandSender, @NonNull Type requiredSenderTypes, @NonNull List<@NonNull CommandComponent<?>> currentChain, @Nullable Command<?> command) Construct a new command parse exceptionInvalidCommandSenderException(@NonNull Object commandSender, @NonNull Set<Type> requiredSenderTypes, @NonNull List<@NonNull CommandComponent<?>> currentChain, @Nullable Command<?> command) Construct a new command parse exception -
Method Summary
Modifier and TypeMethodDescriptioncommand()Returns the Command which the sender is invalid for.Returns the required sender types, a sender must satisfy one.Methods inherited from class org.incendo.cloud.exception.CommandParseException
commandSender, currentChainMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InvalidCommandSenderException
@API(status=INTERNAL, consumers="org.incendo.cloud.*") public InvalidCommandSenderException(@NonNull Object commandSender, @NonNull Type requiredSenderTypes, @NonNull List<@NonNull CommandComponent<?>> currentChain, @Nullable Command<?> command) Construct a new command parse exception- Parameters:
commandSender- Sender who executed the commandrequiredSenderTypes- The sender type that is requiredcurrentChain- Chain leading up to the exceptioncommand- Command
-
InvalidCommandSenderException
@API(status=INTERNAL, consumers="org.incendo.cloud.*") public InvalidCommandSenderException(@NonNull Object commandSender, @NonNull Set<Type> requiredSenderTypes, @NonNull List<@NonNull CommandComponent<?>> currentChain, @Nullable Command<?> command) Construct a new command parse exception- Parameters:
commandSender- Sender who executed the commandrequiredSenderTypes- The sender type that is requiredcurrentChain- Chain leading up to the exceptioncommand- Command
-
-
Method Details
-
requiredSenderTypes
Returns the required sender types, a sender must satisfy one.- Returns:
- required sender types
-
getMessage
- Overrides:
getMessagein classThrowable
-
command
Returns the Command which the sender is invalid for.- Returns:
- command
-