Package studio.mevera.imperat.exception
Class PermissionDeniedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
studio.mevera.imperat.exception.CommandException
studio.mevera.imperat.exception.PermissionDeniedException
- All Implemented Interfaces:
Serializable
Thrown when a command source lacks the required permission to execute a command or usage.
Carries %command% and %usage% placeholders
which are used by the throwable resolver in ImperatConfigImpl.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPermissionDeniedException(String label, CommandPathway<? extends CommandSource> executingPathway, PermissionHolder permissionIssuer) -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
PermissionDeniedException
public PermissionDeniedException(String label, CommandPathway<? extends CommandSource> executingPathway, PermissionHolder permissionIssuer)
-
-
Method Details
-
getExecutingPathway
- Returns:
- the pathway that couldn't be executed due to lack of permissions
-
getLabel
- Returns:
- The label/alias provided in the input for the root command.
-
getPermissionIssuer
- Returns:
- The permission holding object, in which, the source didn't have the permission for to be used.
It can be either
ArgumentorCommandPathwayor evenCommand(including sub-commands)
-