Interface PlayerManager


public interface PlayerManager
Manages player-specific data and network channels.

This manager is responsible for injecting and retrieving PlayerChannelHandler instances, which are essential for sending custom packets to players.

Since:
1.15.2
  • Method Details

    • player

      @Nullable @Nullable PlayerChannelHandler player(@NotNull @NotNull UUID uuid)
      Retrieves the channel handler for a player by their UUID.
      Parameters:
      uuid - the player's UUID
      Returns:
      the channel handler, or null if not found
      Since:
      1.15.2
    • player

      @NotNull @NotNull PlayerChannelHandler player(@NotNull @NotNull PlatformPlayer player)
      Gets or creates the channel handler for a player.

      Note: This should not be used with fake players. Use player(UUID) instead for those cases.

      Parameters:
      player - the player
      Returns:
      the channel handler
      Since:
      1.15.2