Closed DarkSeraphim closed 1 month ago
A bit of a pain indeed. Explains why I was randomly getting messages I was sure I wasn't meant to be getting.
Like @Fireflies said, this is bringing some issues.
i think this is not a problem anymore, if it is, reopen
BungeeCord optimistically sets dimensionChange to false after an initial connect or server switch, which causes disconnect packets being sent to the client as chat messages. However, in the case that a connection did not went through (i.e. the server being directed to an online server) or when the disconnect is delayed (loading data in the AsyncPlayerPreLoginEvent, later disallowing) will cause a delayed kick packet.
But as BungeeCord set the dimensionChange to false, it will happily convert that kick packet into a message, which is never seen by the client (because who reads chat messages whenever they're stuck in world loading or logging in), thus causing the client to wait for an eternity (thank god for timeouts, but that's still an arbitrary one)
Rather, have it set to true when there is at least some form of confirmation that the client is past such a screen (i.e. the downloading world screen disappears after a player position packet has been sent).
EDIT: the "online server" part was a wrong fallback - it should be going to another part of the network, which also happened to be offline (yey). For that reason, it fell back to a server it should've never reached, causing the "Nope, it's online" from BungeeCord. Normally this isn't a real problem, but in combination with the user being stuck in world loading and exceptions being reported as messages rather than kicks, this actually caused one nice issue which I could only discover by actually watching the incoming packet stream from the client end.