Class LeaderboardFetchResult

java.lang.Object
de.marcely.bedwars.api.player.LeaderboardFetchResult

public class LeaderboardFetchResult extends Object
  • Constructor Details

  • Method Details

    • getStatSet

      public PlayerStatSet getStatSet()
      Get the stat set that was used to order the players.
      Returns:
      The stat set with which the players were ordered
    • getMinRank

      public int getMinRank()
      Gets the minimum rank that has been fetched with this result.

      Starts at 1 (= best player).

      Returns:
      The minimum rank that can be obtained
    • getMaxRank

      public int getMaxRank()
      Gets the maximum rank that has been fetched with this result.
      Returns:
      The maximum rank that can be obtained
    • getStatsAtRank

      @Nullable public @Nullable PlayerStats getStatsAtRank(int rank)
      Obtains the stats of the player at the given rank.

      May be null if no player has reached the given rank yet.

      Parameters:
      rank - The rank we want to check
      Returns:
      The stats of the player that is at the given rank. May be null
      Throws:
      IllegalArgumentException - In case the rank parameter is out of bounds (must be between min and max)
    • getPropertiesAtRank

      @Nullable public @Nullable PlayerProperties getPropertiesAtRank(int rank)
      Obtains the properties of the player at the given rank.

      May be null if no player has reached the given rank yet.

      Parameters:
      rank - The rank we want to check
      Returns:
      The properties of the player that is at the given rank. May be null
      Throws:
      IllegalArgumentException - In case the rank parameter is out of bounds (must be between min and max)