Class Cache

java.lang.Object
us.ajg0702.leaderboards.cache.Cache

public class Cache extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • getPlugin

      public LeaderboardPlugin getPlugin()
    • getStat

      public StatEntry getStat(int position, String board, TimedType type)
      Get a stat. It is recommended you use TopManager#getStat instead of this, unless it is of absolute importance that you have the most up-to-date information
      Parameters:
      position - The position to get
      board - The board
      Returns:
      The StatEntry representing the position of the board
    • getStatEntry

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

      public int getBoardSize(String board)
    • getTotal

      public double getTotal(String board, TimedType type)
    • createBoard

      public boolean createBoard(String name)
    • removePlayer

      public boolean removePlayer(String board, String playerName)
    • boardExists

      public boolean boardExists(String board)
    • getBoards

      public List<String> getBoards()
    • getDbTableList

      public List<String> getDbTableList()
    • removeBoard

      public boolean removeBoard(String board)
    • updatePlayerStats

      public void updatePlayerStats(org.bukkit.OfflinePlayer player)
    • updateStat

      public void updateStat(String board, org.bukkit.OfflinePlayer player)
    • getLastTotal

      public double getLastTotal(String board, org.bukkit.OfflinePlayer player, TimedType type)
    • getLastReset

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

      public void reset(String board, TimedType type) throws ExecutionException, InterruptedException
      Throws:
      ExecutionException
      InterruptedException
    • insertRows

      public void insertRows(String board, List<DbRow> rows) throws SQLException
      Throws:
      SQLException
    • getRows

      public List<DbRow> getRows(String board) throws SQLException
      Throws:
      SQLException
    • getMethod

      public CacheMethod getMethod()
    • alternatePlaceholders

      public static String alternatePlaceholders(String board)
    • getTablePrefix

      public String getTablePrefix()
    • cleanPlayer

      public void cleanPlayer(org.bukkit.entity.Player player)
      Cleans a player from some variables to prevent memory leaks. Should only be called when the player logs out
      Parameters:
      player - the player to remove
    • getNonExistantBoards

      public List<String> getNonExistantBoards()