Class TopManager

java.lang.Object
us.ajg0702.leaderboards.boards.TopManager

public class TopManager extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • shutdown

      public void shutdown()
    • getStat

      public StatEntry getStat(int position, String board, TimedType type)
      Get a leaderboard position
      Parameters:
      position - The position to get
      board - The board
      Returns:
      The StatEntry representing the position on the board
    • getStatEntry

      public StatEntry getStatEntry(org.bukkit.OfflinePlayer player, String board, TimedType type)
      Get a leaderboard position
      Parameters:
      player - The position to get
      board - The board
      Returns:
      The StatEntry representing the position on the board
    • getCachedStatEntry

      public StatEntry getCachedStatEntry(org.bukkit.OfflinePlayer player, String board, TimedType type)
    • getCachedStatEntry

      public StatEntry getCachedStatEntry(org.bukkit.OfflinePlayer player, String board, TimedType type, boolean fetchIfAbsent)
    • getCachedStat

      public StatEntry getCachedStat(int position, String board, TimedType type)
    • getCachedStat

      public StatEntry getCachedStat(PositionBoardType positionBoardType)
    • getBoardSize

      public int getBoardSize(String board)
      Get the size of a leaderboard (number of players)
      Parameters:
      board - The board
      Returns:
      The number of players in that board
    • getTotal

      public double getTotal(String board, TimedType type)
      Gets the sum of all players on the leaderboard
      Parameters:
      board - the board
      type - the timed type
      Returns:
      the sum of all players in the specified board for the specified timed type
    • getBoards

      public List<String> getBoards()
    • fetchBoardsAsync

      public void fetchBoardsAsync()
    • fetchBoards

      public List<String> fetchBoards()
    • getFetching

      public int getFetching()
    • getFetchingAverage

      public int getFetchingAverage()
    • getLastReset

      public long getLastReset(String board, TimedType type)
    • getExtra

      public String getExtra(UUID id, String placeholder)
    • fetchExtra

      public String fetchExtra(UUID id, String placeholder)
    • fetchExtraAsync

      public void fetchExtraAsync(UUID id, String placeholder)
    • getCachedExtra

      public String getCachedExtra(UUID id, String placeholder)
    • getRelative

      public StatEntry getRelative(org.bukkit.OfflinePlayer player, int difference, String board, TimedType type)
    • cacheTime

      public int cacheTime()
    • getRolling

      public List<Integer> getRolling()
    • getActiveFetchers

      public int getActiveFetchers()
    • getMaxFetchers

      public int getMaxFetchers()
    • getQueuedTasks

      public int getQueuedTasks()
    • getWorkers

      public int getWorkers()
    • boardExists

      public boolean boardExists(String board)
    • submit

      public Future<?> submit(Runnable task)