-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ServerKickEvent is not fired when kicked from a server stop #3695
Comments
@md-5 Is there a reason we don't call the event at this point? |
If there's actually a kick it should be called |
Yes there is no kick i have read your old comments on old prs, but what do we do? how can we handle it so the player does not get disconnected from the proxy |
I am also a bit confused if i kill the backend server, the first event called is the PlayerDisconnectEvent and the handlerboss first closes the players connection and after that the connection to the server.And than the ServerDisconnectEvent is called Shoulnt it be the other way around? https://outfluencer.dev/data/bungeelog.txt for contect bungee is on 25577 backend on 25565 |
If there's no kick then a different event should be used and this bug is invalid. Wouldn't the event be ServerDisconnectEvent? |
yes but you cant cancel the disconnection of the player |
look into my log please the PlayerDisconnectEvent is called before the ServerDisconnectEvent Edit: Edit of edit: |
In fact, it's not a kick by the code, but a kick by the force connection closed with the backend server. It's not a basic move or basic disconnect, so it more apply to kick, and that would be helpful for more compatibility with waterfall users and less dev for you to use the ServerKickEvent |
nvm i think i was just stupid and dont understand what actually happend You need to put the priorities inyou bungeecord config. If en exception is thrown it will send the player to one of the specified server. if we get a kick the ServerKickEvent is called |
@md-5 i made a test spigot plugin to show the exact problem This is the bukkit code. I close the connection without kicking the player
this will only call the disconnected(ChannelWrapper channel) method in the DownstreamBridge of BungeeCord THE PROBLEM IS THAT:
It closes the connection of the player without calling any events before it (i printed all events) here:
so you cant cancel the disconnection of the player by any chance We would need to call the ServerDisconnectEvent before we execute this code
and add a way to cancel the disconnection |
@Elikill58 i hope #3696 will help you out |
So, with that, I should simply set the reconnect server ? Also, why doesn't simply call the kick event as waterfall did ? |
because we do not receive a Kick packet from the backend and we already have a fallback functionality with priorities in bungeecord that we can use. (what i did in my pr) |
Also waterfall is a fork of bungeecord |
and yes not it searches for the next server to fallback like it should, i looked it ub btw watefall does the same but also calling a server kick event. But you dont need that you can use the ServerDisconnectEvent with this PR |
Bungeecord version
git:BungeeCord-Bootstrap:1.20-R0.3-SNAPSHOT:18eae8a:1842
Server version
all
Client version
1.20.6
Bungeecord plugins
The bug
On proxy, with this code:
When stop your spigot server, this event will not be fired. There is no event to manage those players, as
ServerDisconnectEvent
is called when the player is disconnected from proxy.Checking
The text was updated successfully, but these errors were encountered: