Class IOManager

java.lang.Object
studio.magemonkey.fabled.data.io.IOManager
Direct Known Subclasses:
ConfigIO, FabledPlayersSQL

public abstract class IOManager extends Object
Base class for managers that handle saving and loading player data
  • Field Details

    • api

      protected final Fabled api
      API reference
  • Constructor Details

    • IOManager

      protected IOManager(Fabled api)
      Initializes a new IO manager
      Parameters:
      api - Fabled reference
  • Method Details

    • loadAll

      public abstract Map<UUID,PlayerAccounts> loadAll()
      Loads player data for all online players
      Returns:
      loaded player data
    • loadData

      public abstract PlayerAccounts loadData(org.bukkit.OfflinePlayer player)
      Loads data for the player
      Parameters:
      player - player to load for
      Returns:
      loaded player data
    • saveData

      public abstract void saveData(PlayerAccounts data)
      Saves the player's data
      Parameters:
      data - data to save
    • saveAll

      public void saveAll()
      Saves all player data
    • load

      public static PlayerAccounts load(org.bukkit.OfflinePlayer player, studio.magemonkey.codex.mccore.config.parse.DataSection file)
      Loads data from the DataSection for the given player
      Parameters:
      player - player to load for
      file - DataSection containing the account info
      Returns:
      the loaded player account data
    • save

      public static studio.magemonkey.codex.mccore.config.parse.DataSection save(PlayerAccounts data)