Package net.glowstone.io.nbt
Class NbtPlayerDataService
java.lang.Object
net.glowstone.io.nbt.NbtPlayerDataService
- All Implemented Interfaces:
PlayerDataService
Standard NBT-based player data storage.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.glowstone.io.PlayerDataService
PlayerDataService.PlayerReader -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbeginReadingData(UUID uuid) Begin reading player data for online or offline player loading.CompletableFuture<Collection<org.bukkit.OfflinePlayer>>Get a collection of all known offline players.voidreadData(GlowPlayer player) Shorthand method to read data into an existing player entity.voidwriteData(GlowPlayer player) Save all data for an online player.
-
Constructor Details
-
NbtPlayerDataService
-
-
Method Details
-
getOfflinePlayers
Description copied from interface:PlayerDataServiceGet a collection of all known offline players.Currently online players may or may not be included, but if they are, they will be included in OfflinePlayer form.
- Specified by:
getOfflinePlayersin interfacePlayerDataService- Returns:
- All known offline players.
-
beginReadingData
Description copied from interface:PlayerDataServiceBegin reading player data for online or offline player loading.Some attributes may be read before or without constructing a player entity, see
PlayerDataService.PlayerReaderfor more information.When finished with the PlayerReader,
PlayerDataService.PlayerReader.close()should be called.- Specified by:
beginReadingDatain interfacePlayerDataService- Parameters:
uuid- The UUID of the player to read data for.- Returns:
- The
PlayerDataService.PlayerReaderto use.
-
readData
Description copied from interface:PlayerDataServiceShorthand method to read data into an existing player entity.- Specified by:
readDatain interfacePlayerDataService- Parameters:
player- The target player.
-
writeData
Description copied from interface:PlayerDataServiceSave all data for an online player.- Specified by:
writeDatain interfacePlayerDataService- Parameters:
player- The source player.
-