Interface PlayerLoginProcessEvent

All Superinterfaces:
LuckPermsEvent, Result

public interface PlayerLoginProcessEvent extends LuckPermsEvent, Result
Called when LuckPerms has finished processing a Player's initial connection.

This event will always execute during the platforms async connection event. The LuckPerms platform listener processing the connection will block while this event is posted.

This, among other things, allows you to wait until permission data is loaded for a User during the BungeeCord 'LoginEvent', as event priorities are ignored by the current implementation.

The implementation will make an attempt to ensure this event is called for all connections, even if the operation to load User data was not successful. Note that LuckPerms will usually cancel the platform connection event if data could not be loaded.

  • Method Details

    • getUniqueId

      @NonNull UUID getUniqueId()
      Gets the UUID of the connection which was processed
      Returns:
      the uuid of the connection which was processed
    • getUsername

      @NonNull String getUsername()
      Gets the username of the connection which was processed
      Returns:
      the username of the connection which was processed
    • wasSuccessful

      default boolean wasSuccessful()
      Gets if the login was processed successfully.
      Specified by:
      wasSuccessful in interface Result
      Returns:
      true if the login was successful
    • getUser

      @Nullable User getUser()
      Gets the resultant User instance which was loaded.

      Returns null if the login was not processed successfully.

      Returns:
      the user instance