Interface PlayerChannelHandler

All Superinterfaces:
AutoCloseable, Identifiable

public interface PlayerChannelHandler extends Identifiable, AutoCloseable
Manages the network channel for a player, allowing for packet interception and injection.

This is crucial for handling custom packets and entity tracking.

Since:
1.15.2
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull BasePlayer
    Returns the base player adapter.
    void
    Closes the channel handler, cleaning up resources.
    default int
    id()
    Returns the integer ID of the object (e.g., entity ID).
    default @NotNull PlatformPlayer
    Returns the Bukkit player associated with this handler.
    void
    Sends the correct entity data for a specific tracker to the player.
    default @NotNull UUID
    Returns the UUID of the object.
  • Method Details

    • player

      @NotNull default @NotNull PlatformPlayer player()
      Returns the Bukkit player associated with this handler.
      Returns:
      the player
      Since:
      1.15.2
    • uuid

      @NotNull default @NotNull UUID uuid()
      Description copied from interface: Identifiable
      Returns the UUID of the object.
      Specified by:
      uuid in interface Identifiable
      Returns:
      the UUID
    • id

      default int id()
      Description copied from interface: Identifiable
      Returns the integer ID of the object (e.g., entity ID).
      Specified by:
      id in interface Identifiable
      Returns:
      the ID
    • base

      @NotNull @NotNull BasePlayer base()
      Returns the base player adapter.
      Returns:
      the base player
      Since:
      1.15.2
    • sendEntityData

      void sendEntityData(@NotNull @NotNull EntityTrackerRegistry registry)
      Sends the correct entity data for a specific tracker to the player.
      Parameters:
      registry - the entity tracker registry
      Since:
      1.15.2
    • close

      void close()
      Closes the channel handler, cleaning up resources.
      Specified by:
      close in interface AutoCloseable
      Since:
      1.15.2