Class PermissionDeniedException

All Implemented Interfaces:
Serializable

public final class PermissionDeniedException extends CommandException
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 Details

  • Method Details

    • getExecutingPathway

      public CommandPathway<? extends CommandSource> getExecutingPathway()
      Returns:
      the pathway that couldn't be executed due to lack of permissions
    • getLabel

      public String getLabel()
      Returns:
      The label/alias provided in the input for the root command.
    • getPermissionIssuer

      public PermissionHolder getPermissionIssuer()
      Returns:
      The permission holding object, in which, the source didn't have the permission for to be used. It can be either Argument or CommandPathway or even Command (including sub-commands)