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

@@ -3307,7 +3307,7 @@ public class PacketCreator {
p.writeByte(msgType);
p.writeByte(speaker);
p.writeString(talk);
p.writeBytes(HexTool.getByteArrayFromHexString(endBytes));
p.writeBytes(HexTool.toBytes(endBytes));
return p;
}
@@ -6887,7 +6887,7 @@ public class PacketCreator {
public static Packet customPacket(String packet) {
OutPacket p = new ByteBufOutPacket();
p.writeBytes(HexTool.getByteArrayFromHexString(packet));
p.writeBytes(HexTool.toBytes(packet));
return p;
}