onPacket

inline fun <T> Player.onPacket(crossinline handler: PacketEvent.(T) -> Unit)

Subscribe to specific packet events for a player.