Velocity icon indicating copy to clipboard operation
Velocity copied to clipboard

Velocity doesn't seem to forward server address to backend servers?

Open ghost opened this issue 1 year ago • 1 comments

 @EventHandler
    public void onPlayerHandshake(PlayerHandshakeEvent event) {
        if (event.getServerHostname() != null) {
            hostNames.put(event.getUniqueId(), event.getServerHostname().toLowerCase().replace(" ", ""));
        }
    }
This code worked on bungee but doesn't on velocity, I have modern forwarding enabled and paper backend

ghost avatar May 03 '24 00:05 ghost

the forwarding mechansim is irrelevant

for RegisteredServer#ping(), we pass through the hostname as defined in the servers list, for an actual player, we try to pass through the players vhost that they sent us (else, we fall back to the registered server info if we don't have that)

electronicboy avatar May 03 '24 16:05 electronicboy