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
-
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.void
readData
(GlowPlayer player) Shorthand method to read data into an existing player entity.void
writeData
(GlowPlayer player) Save all data for an online player.
-
Constructor Details
-
NbtPlayerDataService
-
-
Method Details
-
getOfflinePlayers
Description copied from interface:PlayerDataService
Get 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:
getOfflinePlayers
in interfacePlayerDataService
- Returns:
- All known offline players.
-
beginReadingData
Description copied from interface:PlayerDataService
Begin reading player data for online or offline player loading.Some attributes may be read before or without constructing a player entity, see
PlayerDataService.PlayerReader
for more information.When finished with the PlayerReader,
PlayerDataService.PlayerReader.close()
should be called.- Specified by:
beginReadingData
in interfacePlayerDataService
- Parameters:
uuid
- The UUID of the player to read data for.- Returns:
- The
PlayerDataService.PlayerReader
to use.
-
readData
Description copied from interface:PlayerDataService
Shorthand method to read data into an existing player entity.- Specified by:
readData
in interfacePlayerDataService
- Parameters:
player
- The target player.
-
writeData
Description copied from interface:PlayerDataService
Save all data for an online player.- Specified by:
writeData
in interfacePlayerDataService
- Parameters:
player
- The source player.
-