Use HexFormat for converting from bytes to hex string and the other way round

This commit is contained in:
P0nk
2022-02-14 18:37:30 +01:00
parent 0e32f439fb
commit 1daddbf302
4 changed files with 14 additions and 68 deletions

View File

@@ -64,7 +64,7 @@ public class PeCommand extends Command {
}
byte[] packetContent = HexTool.getByteArrayFromHexString(packet);
byte[] packetContent = HexTool.toBytes(packet);
InPacket inPacket = new ByteBufInPacket(Unpooled.wrappedBuffer(packetContent));
short packetId = inPacket.readShort();
final PacketHandler packetHandler = PacketProcessor.getProcessor(0, c.getChannel()).getHandler(packetId);