Skip to content

Commit

Permalink
Fix for #22
Browse files Browse the repository at this point in the history
Based on this comment: #22 (comment)

Use ProtocolVersion.MAXIMUM_VERSION to align with Velocity: PaperMC/Velocity@12a05f6
  • Loading branch information
Spirit55555 committed Apr 3, 2024
1 parent 5e7a811 commit 8f57007
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ public boolean handle(LegacyHandshakePacket packet) {

@Override
public boolean handle(HandshakePacket handshake) {
if (handshake.getProtocolVersion() == null || handshake.getProtocolVersion() == ProtocolVersion.UNKNOWN) {
handshake.setProtocolVersion(ProtocolVersion.MAXIMUM_VERSION);
}

if (handshake.getNextStatus() == StateRegistry.STATUS_ID) {
this.protocolVersion = handshake.getProtocolVersion();
this.serverAddress = handshake.getServerAddress() + ":" + handshake.getPort();
Expand Down

0 comments on commit 8f57007

Please sign in to comment.