mirror of
https://github.com/PaperMC/Velocity.git
synced 2025-02-17 15:39:30 +08:00
Preserve virtual host the player connected to for modern/none forwarding
This makes these modes in-line with legacy forwarding
This commit is contained in:
parent
ea07c6661a
commit
effca0da82
@ -173,7 +173,9 @@ public class VelocityServerConnection implements MinecraftConnectionAssociation,
|
||||
} else if (proxyPlayer.getConnection().getType() == ConnectionTypes.LEGACY_FORGE) {
|
||||
handshake.setServerAddress(destAddress.getHostString() + HANDSHAKE_HOSTNAME_TOKEN);
|
||||
} else {
|
||||
handshake.setServerAddress(destAddress.getHostString());
|
||||
handshake.setServerAddress(proxyPlayer.getVirtualHost()
|
||||
.orElseGet(() -> registeredServer.getServerInfo().getAddress())
|
||||
.getHostString());
|
||||
}
|
||||
handshake.setPort(destAddress.getPort());
|
||||
mc.delayedWrite(handshake);
|
||||
|
Loading…
Reference in New Issue
Block a user