Skip to content

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

@A248

Description

@A248

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs triageThis label is automatically applied to new issues and pull requests to indicate they require triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions