public interface PlayerDataService
Modifier and Type | Interface and Description |
---|---|
static interface |
PlayerDataService.PlayerReader
A piecewise reader for initializing new players.
|
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.
|
PlayerDataService.PlayerReader beginReadingData(UUID uuid)
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.
uuid
- The UUID of the player to read data for.PlayerDataService.PlayerReader
to use.void readData(GlowPlayer player)
player
- The target player.void writeData(GlowPlayer player)
player
- The source player.CompletableFuture<Collection<org.bukkit.OfflinePlayer>> getOfflinePlayers()
Currently online players may or may not be included, but if they are, they will be included in OfflinePlayer form.
Copyright © 2021. All rights reserved.