You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is currently only one event that handles when player quits from the server, the PlayerQuitEvent. Unfortunately that event only works for players that were able to successfully connect to the server. Currently there is no event that is letting users handle disconnects from the server during the login phase.
Describe the solution you'd like.
We can add an event like LoginDisconnectEvent that lets plugin access the connection details, the disconnect reason and such. This can be a non-cancellable event as plugins should not be able to let them connect anyway.
Describe alternatives you've considered.
We can do it via the PreLogin events but they don't let you cover disconnects due to things like velocity.secret verification, or player connecting without velocity.
This event is guaranteed to never fire unless AsyncPlayerPreLoginEvent has been fired beforehand. Are there any plans to implement it for events before that? Also attach a reason for connection closing with it
Activity
kennytv commentedon Mar 29, 2024
There's https://jd.papermc.io/paper/1.20/com/destroystokyo/paper/event/player/PlayerConnectionCloseEvent.html
AV3RG commentedon Mar 29, 2024
This event is guaranteed to never fire unless AsyncPlayerPreLoginEvent has been fired beforehand. Are there any plans to implement it for events before that? Also attach a reason for connection closing with it