Class SQLiteStorage
java.lang.Object
org.strassburger.cookieclickerz.storage.Storage
org.strassburger.cookieclickerz.storage.SQLiteStorage
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExport the player data to a file.Get all players from the database.void
importData
(String fileName) Import player data from a file.void
init()
Initialize the storage system.Load a player data object from the storage system.Load a player data object from the storage system.void
save
(PlayerData playerData) Save a player data object to the storage system.void
Save all cached data to the storage system.Methods inherited from class org.strassburger.cookieclickerz.storage.Storage
getMaxCacheSize, getPlugin, shouldUsePlayerCache
-
Constructor Details
-
SQLiteStorage
-
-
Method Details
-
init
public void init()Description copied from class:Storage
Initialize the storage system. -
save
Description copied from class:Storage
Save a player data object to the storage system. -
load
Description copied from class:Storage
Load a player data object from the storage system. -
load
Description copied from class:Storage
Load a player data object from the storage system. -
export
Description copied from class:Storage
Export the player data to a file. -
importData
Description copied from class:Storage
Import player data from a file.- Specified by:
importData
in classStorage
- Parameters:
fileName
- The name of the file to import from.
-
getAllPlayers
Get all players from the database. The playerdata does not include upgrades or achievements.- Specified by:
getAllPlayers
in classStorage
- Returns:
- A list of PlayerData objects representing all players in the database.
-
saveAllCachedData
public void saveAllCachedData()Description copied from class:Storage
Save all cached data to the storage system.- Specified by:
saveAllCachedData
in classStorage
-