Interface XPrisonRanksAPI


public interface XPrisonRanksAPI
  • Method Summary

    Modifier and Type
    Method
    Description
    getNextPlayerRank(org.bukkit.entity.Player player)
    Gets the next rank a player can achieve.
    getPlayerRank(org.bukkit.entity.Player p)
    Gets the current rank of a player.
    getRankById(int id)
    Gets a rank by its unique ID.
    int
    getRankupProgress(org.bukkit.entity.Player player)
    Gets the player's progress towards ranking up, as a percentage.
    boolean
    isMaxRank(org.bukkit.entity.Player player)
    Checks if a player currently holds the maximum possible rank.
    void
    resetPlayerRank(org.bukkit.entity.Player player)
    Resets a player's rank to the default rank.
    void
    setPlayerRank(org.bukkit.entity.Player player, Rank rank)
    Sets a player's rank to the specified Rank.
  • Method Details

    • getRankById

      Rank getRankById(int id)
      Gets a rank by its unique ID.
      Parameters:
      id - the ID of the rank
      Returns:
      the Rank corresponding to the given ID
    • getPlayerRank

      Rank getPlayerRank(org.bukkit.entity.Player p)
      Gets the current rank of a player.
      Parameters:
      p - the player whose rank is requested
      Returns:
      the player's current Rank
    • getNextPlayerRank

      Optional<Rank> getNextPlayerRank(org.bukkit.entity.Player player)
      Gets the next rank a player can achieve.
      Parameters:
      player - the player whose next rank is requested
      Returns:
      an Optional containing the next Rank, or empty if the player has the max rank
    • getRankupProgress

      int getRankupProgress(org.bukkit.entity.Player player)
      Gets the player's progress towards ranking up, as a percentage.
      Parameters:
      player - the player whose rankup progress is requested
      Returns:
      an integer between 0 and 100 representing the percentage of rankup progress
    • setPlayerRank

      void setPlayerRank(org.bukkit.entity.Player player, Rank rank)
      Sets a player's rank to the specified Rank.
      Parameters:
      player - the player whose rank is to be set
      rank - the Rank to assign to the player
    • resetPlayerRank

      void resetPlayerRank(org.bukkit.entity.Player player)
      Resets a player's rank to the default rank.
      Parameters:
      player - the player whose rank will be reset
    • isMaxRank

      boolean isMaxRank(org.bukkit.entity.Player player)
      Checks if a player currently holds the maximum possible rank.
      Parameters:
      player - the player to check
      Returns:
      true if the player has the max rank, false otherwise