Class RankingException
java.lang.Object
java.lang.Throwable
java.lang.Exception
ru.tehkode.permissions.exceptions.RankingException
- All Implemented Interfaces:
Serializable
Checked exception thrown when a rank promotion or demotion operation fails.
Carries references to the subject user and the promoter (the actor performing the rank change) for use in error messages and logging.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRankingException(String message, Object user, Object promoter) Creates a ranking exception with a message and context objects. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
RankingException
Creates a ranking exception with a message and context objects.- Parameters:
message- human-readable error descriptionuser- the user whose rank could not be changedpromoter- the actor attempting the rank change
-
-
Method Details
-
getUser
Returns the user whose rank change failed.- Returns:
- subject user object (platform-specific type, for example
Player)
-
getTarget
Returns the user whose rank change failed.Alias for
getUser()retained for backward compatibility.- Returns:
- subject user object (platform-specific type, for example
Player)
-
getPromoter
Returns the actor who attempted the rank change.- Returns:
- promoter object (platform-specific type, for example
PlayerorCommandSender)
-