Skip to content

Commit

Permalink
When pinging the server with protocol version -1, return the latest v…
Browse files Browse the repository at this point in the history
…ersion supported by the proxy

This matches BungeeCord's behavior and is in line with what clients specifying this meta-version would expect.
  • Loading branch information
astei committed May 15, 2023
1 parent 673af65 commit 12a05f6
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ public ServerListPingHandler(VelocityServer server) {
}

private ServerPing constructLocalPing(ProtocolVersion version) {
if (version == ProtocolVersion.UNKNOWN) {
version = ProtocolVersion.MAXIMUM_VERSION;
}
VelocityConfiguration configuration = server.getConfiguration();
return new ServerPing(
new ServerPing.Version(version.getProtocol(),
Expand Down

0 comments on commit 12a05f6

Please sign in to comment.