Interface PlayerDataService

All Known Implementing Classes:
NbtPlayerDataService

public interface PlayerDataService
Provider of I/O for player data.
  • Method Details

    • beginReadingData

      PlayerDataService.PlayerReader beginReadingData(UUID uuid)
      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.

      Parameters:
      uuid - The UUID of the player to read data for.
      Returns:
      The PlayerDataService.PlayerReader to use.
    • readData

      void readData(GlowPlayer player)
      Shorthand method to read data into an existing player entity.
      Parameters:
      player - The target player.
    • writeData

      void writeData(GlowPlayer player)
      Save all data for an online player.
      Parameters:
      player - The source player.
    • getOfflinePlayers

      CompletableFuture<Collection<org.bukkit.OfflinePlayer>> getOfflinePlayers()
      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.

      Returns:
      All known offline players.