Package net.luckperms.api.event.player
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.
-
-
Field Summary
-
Fields inherited from interface net.luckperms.api.util.Result
GENERIC_FAILURE, GENERIC_SUCCESS
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description @NonNull UUIDgetUniqueId()Gets the UUID of the connection which was processed@Nullable UsergetUser()Gets the resultant User instance which was loaded.@NonNull StringgetUsername()Gets the username of the connection which was processeddefault booleanwasSuccessful()Gets if the login was processed successfully.-
Methods inherited from interface net.luckperms.api.event.LuckPermsEvent
getEventType, getLuckPerms
-
-
-
-
Method Detail
-
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:
wasSuccessfulin interfaceResult- Returns:
- true if the login was successful
-
getUser
@Nullable User getUser()
Gets the resultant User instance which was loaded.Returns
nullif the login was not processedsuccessfully.- Returns:
- the user instance
-
-