Class SQLiteStorage

java.lang.Object
org.strassburger.cookieclickerz.storage.Storage
org.strassburger.cookieclickerz.storage.SQLiteStorage

public final class SQLiteStorage extends Storage
  • Constructor Details

  • Method Details

    • init

      public void init()
      Description copied from class: Storage
      Initialize the storage system.
      Specified by:
      init in class Storage
    • save

      public void save(PlayerData playerData)
      Description copied from class: Storage
      Save a player data object to the storage system.
      Specified by:
      save in class Storage
      Parameters:
      playerData - The player data object to save.
    • load

      public PlayerData load(UUID uuid)
      Description copied from class: Storage
      Load a player data object from the storage system.
      Specified by:
      load in class Storage
      Parameters:
      uuid - The UUID of the player.
      Returns:
      The player data object.
    • load

      public PlayerData load(String uuid)
      Description copied from class: Storage
      Load a player data object from the storage system.
      Specified by:
      load in class Storage
      Parameters:
      uuid - The UUID of the player.
      Returns:
      The player data object.
    • export

      public String export(String fileName)
      Description copied from class: Storage
      Export the player data to a file.
      Specified by:
      export in class Storage
    • importData

      public void importData(String fileName)
      Description copied from class: Storage
      Import player data from a file.
      Specified by:
      importData in class Storage
      Parameters:
      fileName - The name of the file to import from.
    • getAllPlayers

      public List<PlayerData> getAllPlayers()
      Get all players from the database. The playerdata does not include upgrades or achievements.
      Specified by:
      getAllPlayers in class Storage
      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 class Storage