Class Storage
java.lang.Object
com.zetaplugins.cookieclickerz.storage.Storage
- Direct Known Subclasses:
SQLStorage
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract StringExport the player data to a file.abstract List<PlayerData> Get a List of all players in the storage system.protected intprotected CookieClickerZabstract List<LeaderBoardEntry> getTopCookiesPlayers(int limit) Get a List of the top players by total cookies.abstract List<LeaderBoardEntry> getTopCpcPlayers(int limit) Get a List of the top players by cookies per click.abstract voidimportData(String fileName) Import player data from a file.abstract voidinit()Initialize the storage system.Load a player data object from the storage system.abstract PlayerDataLoad a player data object from the storage system.abstract voidsave(PlayerData playerData) Save a player data object to the storage system.abstract voidSave all cached data to the storage system.protected boolean
-
Constructor Details
-
Storage
-
-
Method Details
-
getPlugin
-
shouldUsePlayerCache
protected boolean shouldUsePlayerCache() -
getMaxCacheSize
protected int getMaxCacheSize() -
init
public abstract void init()Initialize the storage system. -
save
Save a player data object to the storage system.- Parameters:
playerData- The player data object to save.
-
load
Load a player data object from the storage system.- Parameters:
uuid- The UUID of the player.- Returns:
- The player data object.
-
load
Load a player data object from the storage system.- Parameters:
uuid- The UUID of the player.- Returns:
- The player data object.
-
export
Export the player data to a file. -
importData
Import player data from a file.- Parameters:
fileName- The name of the file to import from.
-
getAllPlayers
Get a List of all players in the storage system.- Returns:
- A List of all players. PlayerData does not contain achievements and upgrades.
-
getTopCookiesPlayers
Get a List of the top players by total cookies.- Parameters:
limit- The maximum number of players to return.- Returns:
- A List of the top players. PlayerData does not contain achievements and upgrades.
-
getTopCpcPlayers
Get a List of the top players by cookies per click.- Parameters:
limit- The maximum number of players to return.- Returns:
- A List of the top players. PlayerData does not contain achievements and upgrades.
-
saveAllCachedData
public abstract void saveAllCachedData()Save all cached data to the storage system.
-