Class Storage
java.lang.Object
org.strassburger.cookieclickerz.storage.Storage
- Direct Known Subclasses:
SQLiteStorage
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract String
Export the player data to a file.abstract List
<PlayerData> Get a List of all players in the storage system.protected int
protected CookieClickerZ
abstract void
importData
(String fileName) Import player data from a file.abstract void
init()
Initialize the storage system.abstract PlayerData
Load a player data object from the storage system.abstract PlayerData
Load a player data object from the storage system.abstract void
save
(PlayerData playerData) Save a player data object to the storage system.abstract void
Save 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.
-
saveAllCachedData
public abstract void saveAllCachedData()Save all cached data to the storage system.
-