Make ServersideConnectionEvent.Handshake a Cancellable MessageEvent, like Auth #2461
Labels
status: needs triage
This label is automatically applied to new issues and pull requests to indicate they require triage
Major SpongeAPI version
9
Is this likely to be a breaking change?
No
What are you requesting?
There are good reasons plugins may want to cancel the Handshake event. Unlike the Auth event, the player's correct UUID is available, such as when player info forwarding is configured. Unlike the Login event, the Handshake is asynchronous, which allows plugins to do more work there.
"Canceling" the Handshake event is currently possible by closing the associated connection, as noted in the javadoc.
Some plugins may depend on the player's UUID and issue a database request, for example, to determine whether the player may join. The Handshake event is an ideal event for doing so. It should support cancellation and message-setting, like the Auth event, to better facilitate cancellation and use of the event.
The text was updated successfully, but these errors were encountered: