readPacket static method

ServerPacket? readPacket(
  1. int id,
  2. PacketReader reader
)

Read a single packet by ID.

Implementation

static ServerPacket? readPacket(int id, PacketReader reader) {
  return _clientboundPackets[id]?.clone()?..read(reader);
}