Velocity
Velocity copied to clipboard
ServerPostConnectEvent fires before the player connection is complete (Only 1.20.2)
ServerPostConnectEvent fires before the player connection is complete (Only 1.20.2)
https://github.com/PaperMC/Velocity/pull/1097#discussion_r1355380187
Plugins that use ServerPostConnectEvent cause client errors because the event is fired before the player has completed connecting.
can confirm.
@Subscribe(order = PostOrder.EARLY)
public void onPlayerChat(ServerPostConnectEvent event) {
if (!event.getPlayer().getCurrentServer().isPresent())
return;
/* if (event.getPlayer().getCurrentServer().get().getServerInfo().getName().equalsIgnoreCase("hub"))
return;
if (event.getPlayer().getCurrentServer().get().getServerInfo().getName().equalsIgnoreCase("hub-02"))
return;*/
for (int i = 0; i < 300; i++)
event.getPlayer().sendMessage(this.message);
}
the messages are being sent in a weird way, way after the login
How is this software breaking bug still not fixed.. Prevents any 1.20.2 players from joining with 1.20.2 Velocity and Viaversion only.. 1.20.1 players can join though
I generally fail to understand the issue here, and between my sight issues and health, I don't have the means to go crazy testing This event is sent from the join game packet and always has been, there is 0 garauntees that it's safe to send anything like messages as the client is still in the loading screens as it's not in the world yet; No idea what you mean by client errors, and errors induced due to stuff like via are generally not our issue
Sometime client will disconnect with The package is too large or Reading data beyond range when send plugin message with player just join the server.
This issue occurs at 1.20.2 and when using my plugin.
When I delay the send plugin message pack by 500ms or longer, it will not occur.