346347348349350351352353354355356
PacketManager manager = NetworkConfig.getPacketManager(); NetworkPacket packet = null; if (manager != null) { // we unpack the data using packet manager packet = manager.unpack(data); } else { // we wrap it inside raw packet if (data.length == 0) {