Package kr.toxicity.model.api.nms
Interface PlayerChannelHandler
- All Superinterfaces:
AutoCloseable,Identifiable
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 TypeMethodDescription@NotNull BasePlayerbase()Returns the base player adapter.voidclose()Closes the channel handler, cleaning up resources.default intid()Returns the integer ID of the object (e.g., entity ID).default @NotNull PlatformPlayerplayer()Returns the Bukkit player associated with this handler.voidsendEntityData(@NotNull EntityTrackerRegistry registry) Sends the correct entity data for a specific tracker to the player.default @NotNull UUIDuuid()Returns the UUID of the object.
-
Method Details
-
player
Returns the Bukkit player associated with this handler.- Returns:
- the player
- Since:
- 1.15.2
-
uuid
Description copied from interface:IdentifiableReturns the UUID of the object.- Specified by:
uuidin interfaceIdentifiable- Returns:
- the UUID
-
id
default int id()Description copied from interface:IdentifiableReturns the integer ID of the object (e.g., entity ID).- Specified by:
idin interfaceIdentifiable- Returns:
- the ID
-
base
Returns the base player adapter.- Returns:
- the base player
- Since:
- 1.15.2
-
sendEntityData
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:
closein interfaceAutoCloseable- Since:
- 1.15.2
-