Skip to content

Event Addition: LoginDisconnectEvent #10368

Closed
Closed

Description

@AV3RG

Is your feature request related to a problem?

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.

Other

No response

Activity

  1. kennytv commented on Mar 29, 2024

    @kennytv
    Member
  2. AV3RG commented on Mar 29, 2024

    @AV3RG
    Author

    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

  3. locked and limited conversation to collaborators on Apr 28, 2024
  4. converted this issue into a discussion #10510 on Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: featureRequest for a new Feature.

    Fields

    No fields configured for Feature.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions