PaperMC / Velocity

The modern, next-generation Minecraft server proxy.

Home Page:https://papermc.io/software/velocity

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

ThrowerWay opened this issue · 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

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)