Package us.ajg0702.leaderboards.boards
Class TopManager
java.lang.Object
us.ajg0702.leaderboards.boards.TopManager
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boardExists
(String board) int
void
fetchExtra
(UUID id, String placeholder) void
fetchExtraAsync
(UUID id, String placeholder) int
int
getBoardSize
(String board) Get the size of a leaderboard (number of players)getCachedExtra
(UUID id, String placeholder) getCachedStat
(int position, String board, TimedType type) getCachedStat
(PositionBoardType positionBoardType) getCachedStatEntry
(org.bukkit.OfflinePlayer player, String board, TimedType type) getCachedStatEntry
(org.bukkit.OfflinePlayer player, String board, TimedType type, boolean fetchIfAbsent) int
int
long
getLastReset
(String board, TimedType type) int
int
getRelative
(org.bukkit.OfflinePlayer player, int difference, String board, TimedType type) Get a leaderboard positiongetStatEntry
(org.bukkit.OfflinePlayer player, String board, TimedType type) Get a leaderboard positiondouble
Gets the sum of all players on the leaderboardint
void
shutdown()
Future<?>
-
Field Details
-
positionPlayerCache
-
-
Constructor Details
-
TopManager
-
-
Method Details
-
shutdown
public void shutdown() -
getStat
Get a leaderboard position- Parameters:
position
- The position to getboard
- The board- Returns:
- The StatEntry representing the position on the board
-
getStatEntry
Get a leaderboard position- Parameters:
player
- The position to getboard
- The board- Returns:
- The StatEntry representing the position on the board
-
getCachedStatEntry
-
getCachedStatEntry
-
getCachedStat
-
getCachedStat
-
getBoardSize
Get the size of a leaderboard (number of players)- Parameters:
board
- The board- Returns:
- The number of players in that board
-
getTotal
Gets the sum of all players on the leaderboard- Parameters:
board
- the boardtype
- the timed type- Returns:
- the sum of all players in the specified board for the specified timed type
-
getBoards
-
fetchBoardsAsync
public void fetchBoardsAsync() -
fetchBoards
-
getFetching
public int getFetching() -
getFetchingAverage
public int getFetchingAverage() -
getLastReset
-
getExtra
-
fetchExtra
-
fetchExtraAsync
-
getCachedExtra
-
getRelative
-
cacheTime
public int cacheTime() -
getRolling
-
getActiveFetchers
public int getActiveFetchers() -
getMaxFetchers
public int getMaxFetchers() -
getQueuedTasks
public int getQueuedTasks() -
getWorkers
public int getWorkers() -
boardExists
-
submit
-