Skip to content
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

Make ServersideConnectionEvent.Handshake a Cancellable MessageEvent, like Auth #2461

Open
A248 opened this issue Aug 18, 2023 · 0 comments
Open
Labels
status: needs triage This label is automatically applied to new issues and pull requests to indicate they require triage

Comments

@A248
Copy link
Contributor

A248 commented Aug 18, 2023

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.

@A248 A248 added the status: needs triage This label is automatically applied to new issues and pull requests to indicate they require triage label Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage This label is automatically applied to new issues and pull requests to indicate they require triage
Projects
None yet
Development

No branches or pull requests

1 participant