mirror of
https://github.com/lucko/LuckPerms.git
synced 2025-08-21 05:41:20 +02:00
Fix potential race condition in LuckPermsProvider#get
This commit is contained in:
@@ -48,6 +48,7 @@ public final class LuckPermsProvider {
|
|||||||
* @throws IllegalStateException if the API is not loaded yet
|
* @throws IllegalStateException if the API is not loaded yet
|
||||||
*/
|
*/
|
||||||
public static @NonNull LuckPerms get() {
|
public static @NonNull LuckPerms get() {
|
||||||
|
LuckPerms instance = LuckPermsProvider.instance;
|
||||||
if (instance == null) {
|
if (instance == null) {
|
||||||
throw new NotLoadedException();
|
throw new NotLoadedException();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user