3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-17 05:20:14 +01:00

Preserve virtual host the player connected to for modern/none forwarding

This makes these modes in-line with legacy forwarding
Dieser Commit ist enthalten in:
Andrew Steinborn 2021-09-25 17:51:58 -04:00
Ursprung ea07c6661a
Commit effca0da82

Datei anzeigen

@ -173,7 +173,9 @@ public class VelocityServerConnection implements MinecraftConnectionAssociation,
} else if (proxyPlayer.getConnection().getType() == ConnectionTypes.LEGACY_FORGE) { } else if (proxyPlayer.getConnection().getType() == ConnectionTypes.LEGACY_FORGE) {
handshake.setServerAddress(destAddress.getHostString() + HANDSHAKE_HOSTNAME_TOKEN); handshake.setServerAddress(destAddress.getHostString() + HANDSHAKE_HOSTNAME_TOKEN);
} else { } else {
handshake.setServerAddress(destAddress.getHostString()); handshake.setServerAddress(proxyPlayer.getVirtualHost()
.orElseGet(() -> registeredServer.getServerInfo().getAddress())
.getHostString());
} }
handshake.setPort(destAddress.getPort()); handshake.setPort(destAddress.getPort());
mc.delayedWrite(handshake); mc.delayedWrite(handshake);