Package de.marcely.bedwars.api.player
Class LeaderboardFetchResult
java.lang.Object
de.marcely.bedwars.api.player.LeaderboardFetchResult
Result object of 
PlayerDataAPI.fetchLeaderboard(PlayerStatSet, int, int, Consumer)- 
Constructor SummaryConstructorsConstructorDescriptionLeaderboardFetchResult(PlayerStatSet statSet, int minRank, int maxRank, PlayerStats[] stats, PlayerProperties[] properties) 
- 
Method SummaryModifier and TypeMethodDescriptionintGets the maximum rank that has been fetched with this result.intGets the minimum rank that has been fetched with this result.@Nullable PlayerPropertiesgetPropertiesAtRank(int rank) Obtains the properties of the player at the given rank.@Nullable PlayerStatsgetStatsAtRank(int rank) Obtains the stats of the player at the given rank.Get the stat set that was used to order the players.
- 
Constructor Details- 
LeaderboardFetchResultpublic LeaderboardFetchResult(PlayerStatSet statSet, int minRank, int maxRank, PlayerStats[] stats, PlayerProperties[] properties) 
 
- 
- 
Method Details- 
getStatSetGet the stat set that was used to order the players.- Returns:
- The stat set with which the players were ordered
 
- 
getMinRankpublic 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
 
- 
getMaxRankpublic int getMaxRank()Gets the maximum rank that has been fetched with this result.- Returns:
- The maximum rank that can be obtained
 
- 
getStatsAtRankObtains the stats of the player at the given rank.May be nullif 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)
 
- 
getPropertiesAtRankObtains the properties of the player at the given rank.May be nullif 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)
 
 
-