Class LoginEvent

java.lang.Object
com.velocitypowered.api.event.connection.LoginEvent
All Implemented Interfaces:
ResultedEvent<ResultedEvent.ComponentResult>

@AwaitingEvent public final class LoginEvent extends Object implements ResultedEvent<ResultedEvent.ComponentResult>
This event is fired once the player has been authenticated, but before they connect to a server. Velocity will wait for this event to finish firing before proceeding with the rest of the login process, but you should try to limit the work done in any event that fires during the login process.
  • Constructor Details

    • LoginEvent

      public LoginEvent(Player player, @Nullable String serverIdHash)
      Constructs a new LoginEvent.
      Parameters:
      player - the player who has completed authentication
      serverIdHash - the server ID hash sent to Mojang for authentication, or null if the connection is in offline-mode
    • LoginEvent

      @Deprecated(forRemoval=true) public LoginEvent(Player player)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Constructs a new LoginEvent.
      Parameters:
      player - the player who has completed authentication
  • Method Details