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
Dialog API "Requiring the player to agree before allowing them to join" should be updated to include handling if the user leaves the server during configuration #655
the thread will be blocked forever if the user leaves the server
the awaitingResponse map will leak memory if the user leaves the server
I think the example should be updated accordingly to be clearer on how you handle resource clean up.
One way (recommended by emily) is by using the PlayerConnectionCloseEvent, however there isn't a easy to bind a connection in the AsyncPlayerConnectionConfigureEvent to the PlayerConnectionCloseEvent (the only way would be via the Player's UUID, however the only way to get the player's UUID in AsyncPlayerConnectionConfigureEvent is deprecated)
By the way: When testing this, DO NOT use the "warning icon" -> "Disconnect" option, it seems that there's a client bug that does not close the server connection during the configuration phase when using that button.