Class RankingException

java.lang.Object
java.lang.Throwable
java.lang.Exception
ru.tehkode.permissions.exceptions.RankingException
All Implemented Interfaces:
Serializable

public class RankingException extends Exception
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 Details

    • RankingException

      public RankingException(String message, Object user, Object promoter)
      Creates a ranking exception with a message and context objects.
      Parameters:
      message - human-readable error description
      user - the user whose rank could not be changed
      promoter - the actor attempting the rank change
  • Method Details

    • getUser

      public Object getUser()
      Returns the user whose rank change failed.
      Returns:
      subject user object (platform-specific type, for example Player)
    • getTarget

      public Object 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

      public Object getPromoter()
      Returns the actor who attempted the rank change.
      Returns:
      promoter object (platform-specific type, for example Player or CommandSender)