Package net.luckperms.api.event.player
Interface PlayerLoginProcessEvent
- All Superinterfaces:
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.
-
Field Summary
Fields inherited from interface net.luckperms.api.util.Result
GENERIC_FAILURE, GENERIC_SUCCESS -
Method Summary
Modifier and TypeMethodDescriptionGets the UUID of the connection which was processedgetUser()Gets the resultant User instance which was loaded.Gets the username of the connection which was processeddefault booleanGets if the login was processed successfully.Methods inherited from interface net.luckperms.api.event.LuckPermsEvent
getEventType, getLuckPerms
-
Method Details
-
getUniqueId
Gets the UUID of the connection which was processed- Returns:
- the uuid of the connection which was processed
-
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:
wasSuccessfulin interfaceResult- Returns:
- true if the login was successful
-
getUser
Gets the resultant User instance which was loaded.Returns
nullif the login was not processedsuccessfully.- Returns:
- the user instance
-