mirror of
https://github.com/Minestom/Minestom.git
synced 2024-11-10 21:00:36 +01:00
Use nullable writer
This commit is contained in:
parent
4c90af572a
commit
6145a9f5e7
@ -93,11 +93,6 @@ public record LoginStartPacket(@NotNull String username, @Nullable PlayerPublicK
|
||||
if (username.length() > 16)
|
||||
throw new IllegalArgumentException("Username is not allowed to be longer than 16 characters");
|
||||
writer.writeSizedString(username);
|
||||
if (publicKey == null) {
|
||||
writer.writeBoolean(false);
|
||||
} else {
|
||||
writer.writeBoolean(true);
|
||||
writer.write(publicKey);
|
||||
}
|
||||
writer.writeNullable(publicKey);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user