public final class LuckPerms extends Object
LuckPermsApi.
Ideally, the ServiceManager for the platform should be used to obtain an instance, however, this provider can be used if you need static access.
| Modifier and Type | Method and Description |
|---|---|
static @NonNull LuckPermsApi |
getApi()
Gets an instance of the
LuckPermsApi,
throwing IllegalStateException if an instance is not yet loaded. |
static @NonNull Optional<LuckPermsApi> |
getApiSafe()
Gets an instance of
LuckPermsApi, if it is loaded. |
public static @NonNull LuckPermsApi getApi()
LuckPermsApi,
throwing IllegalStateException if an instance is not yet loaded.
Will never return null.
IllegalStateException - if the api is not loadedpublic static @NonNull Optional<LuckPermsApi> getApiSafe()
LuckPermsApi, if it is loaded.
Unlike getApi(), this method will not throw an
IllegalStateException if an instance is not yet loaded, rather return
an empty Optional.