registerContextHandler

Registers a contextual handler that routes and consumes every interaction.


Registers a contextual handler with packet-routing policy.

The routing policy is evaluated on the player's Netty event-loop thread. It must be fast, thread-safe, and must not access Bukkit main-thread-only state. A routed handler is invoked later on the Bukkit main thread by the maintained packet listeners.

Return

lifecycle registration for this exact mapping

Parameters

entityId

entity ID sent by the client

routingPolicy

policy deciding whether to route, consume, or pass the packet

handler

contextual handler for routed packets