Use writeByteArray

Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
TheMode 2021-12-15 15:28:26 +01:00
parent 16d3d4417e
commit 14d6a0993b

View File

@ -18,10 +18,8 @@ public record EncryptionRequestPacket(@NotNull String serverId,
@Override @Override
public void write(@NotNull BinaryWriter writer) { public void write(@NotNull BinaryWriter writer) {
writer.writeSizedString(serverId); writer.writeSizedString(serverId);
writer.writeVarInt(publicKey.length); writer.writeByteArray(publicKey);
writer.writeBytes(publicKey); writer.writeByteArray(verifyToken);
writer.writeVarInt(verifyToken.length);
writer.writeBytes(verifyToken);
} }
@Override @Override