Package us.ajg0702.leaderboards.cache
Class Cache
java.lang.Object
us.ajg0702.leaderboards.cache.Cache
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
alternatePlaceholders
(String board) boolean
boardExists
(String board) void
cleanPlayer
(org.bukkit.entity.Player player) Cleans a player from some variables to prevent memory leaks.boolean
createBoard
(String name) int
getBoardSize
(String board) long
getLastReset
(String board, TimedType type) double
getLastTotal
(String board, org.bukkit.OfflinePlayer player, TimedType type) Get a stat.getStatEntry
(org.bukkit.OfflinePlayer player, String board, TimedType type) double
void
insertRows
(String board, List<DbRow> rows) boolean
removeBoard
(String board) boolean
removePlayer
(String board, String playerName) void
void
updatePlayerStats
(org.bukkit.OfflinePlayer player) void
updateStat
(String board, org.bukkit.OfflinePlayer player)
-
Field Details
-
rolling
-
-
Constructor Details
-
Cache
-
-
Method Details
-
getPlugin
-
getStat
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 getboard
- The board- Returns:
- The StatEntry representing the position of the board
-
getStatEntry
-
getBoardSize
-
getTotal
-
createBoard
-
removePlayer
-
boardExists
-
getBoards
-
getDbTableList
-
removeBoard
-
updatePlayerStats
public void updatePlayerStats(org.bukkit.OfflinePlayer player) -
updateStat
-
getLastTotal
-
getLastReset
-
reset
-
insertRows
- Throws:
SQLException
-
getRows
- Throws:
SQLException
-
getMethod
-
alternatePlaceholders
-
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
-