Package org.incendo.cloud.exception
Class NoPermissionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
org.incendo.cloud.exception.CommandParseException
org.incendo.cloud.exception.NoPermissionException
- All Implemented Interfaces:
Serializable
Exception thrown when a command sender misses a permission required
to execute a
Command- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNoPermissionException(@NonNull PermissionResult permissionResult, @NonNull Object commandSender, @NonNull List<@NonNull CommandComponent<?>> currentChain) Constructs a new no permission exception, -
Method Summary
Modifier and TypeMethodDescriptionfinal Throwablefinal Stringfinal ThrowableReturns the missingPermissionReturns the falsyPermissionResultthat caused this exception.Methods inherited from class org.incendo.cloud.exception.CommandParseException
commandSender, currentChainMethods inherited from class java.lang.Throwable
addSuppressed, getCause, getLocalizedMessage, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
NoPermissionException
@API(status=INTERNAL, consumers="org.incendo.cloud.*") public NoPermissionException(@NonNull PermissionResult permissionResult, @NonNull Object commandSender, @NonNull List<@NonNull CommandComponent<?>> currentChain) Constructs a new no permission exception,- Parameters:
permissionResult- result of the permission checkcommandSender- command sendercurrentChain- chain leading up to the exception
-
-
Method Details
-
getMessage
- Overrides:
getMessagein classThrowable
-
missingPermission
Returns the missingPermission- Returns:
- the missing permission
-
permissionResult
Returns the falsyPermissionResultthat caused this exception.- Returns:
- the falsy result that caused this exception
-
fillInStackTrace
- Overrides:
fillInStackTracein classThrowable
-
initCause
-