on

inline fun <T : Any> PacketListener.on(noinline action: T.(PacketEvent) -> Unit)

Registers a type-safe handler for both sent and received packets of type T.

Reified inline variant of PacketListener.on.