public class NbtPlayerDataService extends Object implements PlayerDataService
PlayerDataService.PlayerReader| Constructor and Description |
|---|
NbtPlayerDataService(GlowServer server,
File playerDir) |
| Modifier and Type | Method and Description |
|---|---|
PlayerDataService.PlayerReader |
beginReadingData(UUID uuid)
Begin reading player data for online or offline player loading.
|
CompletableFuture<Collection<org.bukkit.OfflinePlayer>> |
getOfflinePlayers()
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.
|
public NbtPlayerDataService(GlowServer server, File playerDir)
public CompletableFuture<Collection<org.bukkit.OfflinePlayer>> getOfflinePlayers()
PlayerDataServiceCurrently online players may or may not be included, but if they are, they will be included in OfflinePlayer form.
getOfflinePlayers in interface PlayerDataServicepublic PlayerDataService.PlayerReader beginReadingData(UUID uuid)
PlayerDataServiceSome 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.
beginReadingData in interface PlayerDataServiceuuid - The UUID of the player to read data for.PlayerDataService.PlayerReader to use.public void readData(GlowPlayer player)
PlayerDataServicereadData in interface PlayerDataServiceplayer - The target player.public void writeData(GlowPlayer player)
PlayerDataServicewriteData in interface PlayerDataServiceplayer - The source player.Copyright © 2021. All rights reserved.