Package studio.magemonkey.fabled.data.io
Class IOManager
java.lang.Object
studio.magemonkey.fabled.data.io.IOManager
- Direct Known Subclasses:
ConfigIO
,FabledPlayersSQL
Base class for managers that handle saving and loading player data
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PlayerAccounts
load
(org.bukkit.OfflinePlayer player, studio.magemonkey.codex.mccore.config.parse.DataSection file) Loads data from the DataSection for the given playerabstract Map
<UUID, PlayerAccounts> loadAll()
Loads player data for all online playersabstract PlayerAccounts
loadData
(org.bukkit.OfflinePlayer player) Loads data for the playerstatic studio.magemonkey.codex.mccore.config.parse.DataSection
save
(PlayerAccounts data) void
saveAll()
Saves all player dataabstract void
saveData
(PlayerAccounts data) Saves the player's data
-
Field Details
-
api
API reference
-
-
Constructor Details
-
IOManager
Initializes a new IO manager- Parameters:
api
- Fabled reference
-
-
Method Details
-
loadAll
Loads player data for all online players- Returns:
- loaded player data
-
loadData
Loads data for the player- Parameters:
player
- player to load for- Returns:
- loaded player data
-
saveData
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 forfile
- DataSection containing the account info- Returns:
- the loaded player account data
-
save
-