Interface PlayerDataService
public interface PlayerDataService
Read access to the player data stored by SepareWorldItems, whatever the storage backend
(YAML files, SQLite, MySQL/MariaDB, MongoDB, Redis).
All methods do IO off the server thread and complete their future on an async thread. Switch back to the server thread yourself before touching game objects.
Note: for the context a player is currently in, the live state is the player itself; the stored record is only updated when the player leaves that context.
-
Method Summary
Modifier and TypeMethodDescription@NotNull CompletableFuture<Boolean> exists(@NotNull UUID player, @NotNull GroupContext context) @NotNull CompletableFuture<Optional<PlayerSnapshot>> load(@NotNull UUID player, @NotNull GroupContext context) @NotNull CompletableFuture<Optional<UUID>> resolveUuid(@NotNull String playerName, @NotNull GroupContext context) Finds the UUID of a player by the last name saved in that context (case-insensitive).
-
Method Details
-
load
@NotNull @NotNull CompletableFuture<Optional<PlayerSnapshot>> load(@NotNull @NotNull UUID player, @NotNull @NotNull GroupContext context) -
exists
@NotNull @NotNull CompletableFuture<Boolean> exists(@NotNull @NotNull UUID player, @NotNull @NotNull GroupContext context) -
resolveUuid
@NotNull @NotNull CompletableFuture<Optional<UUID>> resolveUuid(@NotNull @NotNull String playerName, @NotNull @NotNull GroupContext context) Finds the UUID of a player by the last name saved in that context (case-insensitive).
-