mirror of
https://github.com/GTNewHorizons/Opis.git
synced 2026-11-19 19:59:37 +00:00
Added size/type to the return packet.
This commit is contained in:
1 parent
e099f67fb0
commit
3692055926
2 files changed
+9
-5
No files matched your search
@@ -94,9 +94,13 @@ public class RConServer implements Runnable {
|
||||
ChannelHandlerContext ctx = RConServer.instance.fakePlayers.get(player);
|
||||
|
||||
packet.encode(output);
|
||||
ByteBuf msg = ctx.alloc().buffer(output.toByteArray().length);
|
||||
msg.writeBytes(output.toByteArray());
|
||||
ctx.write(msg);
|
||||
byte[] data = output.toByteArray();
|
||||
|
||||
ByteBuf buf = ctx.alloc().buffer(data.length);
|
||||
buf.writeInt(data.length);
|
||||
buf.writeByte(packetTypes.indexOf(packet.getClass()));
|
||||
buf.writeBytes(data);
|
||||
ctx.write(buf);
|
||||
ctx.flush();
|
||||
|
||||
modOpis.log.info("We should be sending back something here");
|
||||
|
||||
Reference in new issue
Block a user