geforkt von Mirrors/Velocity
Pass the correct virtual host port during the handshake (#1205)
Dieser Commit ist enthalten in:
Ursprung
d4a661870e
Commit
46d018c0f2
@ -176,9 +176,9 @@ public class VelocityServerConnection implements MinecraftConnectionAssociation,
|
|||||||
|
|
||||||
// Initiate the handshake.
|
// Initiate the handshake.
|
||||||
ProtocolVersion protocolVersion = proxyPlayer.getConnection().getProtocolVersion();
|
ProtocolVersion protocolVersion = proxyPlayer.getConnection().getProtocolVersion();
|
||||||
String playerVhost =
|
String playerVhost = proxyPlayer.getVirtualHost()
|
||||||
proxyPlayer.getVirtualHost().orElseGet(() -> registeredServer.getServerInfo().getAddress())
|
.orElseGet(() -> registeredServer.getServerInfo().getAddress())
|
||||||
.getHostString();
|
.getHostString();
|
||||||
|
|
||||||
HandshakePacket handshake = new HandshakePacket();
|
HandshakePacket handshake = new HandshakePacket();
|
||||||
handshake.setNextStatus(StateRegistry.LOGIN_ID);
|
handshake.setNextStatus(StateRegistry.LOGIN_ID);
|
||||||
@ -197,7 +197,9 @@ public class VelocityServerConnection implements MinecraftConnectionAssociation,
|
|||||||
handshake.setServerAddress(playerVhost);
|
handshake.setServerAddress(playerVhost);
|
||||||
}
|
}
|
||||||
|
|
||||||
handshake.setPort(registeredServer.getServerInfo().getAddress().getPort());
|
handshake.setPort(proxyPlayer.getVirtualHost()
|
||||||
|
.orElseGet(() -> registeredServer.getServerInfo().getAddress())
|
||||||
|
.getPort());
|
||||||
mc.delayedWrite(handshake);
|
mc.delayedWrite(handshake);
|
||||||
|
|
||||||
mc.setProtocolVersion(protocolVersion);
|
mc.setProtocolVersion(protocolVersion);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren