Fix potential race condition in LuckPermsProvider#get

This commit is contained in:
Luck 2021-04-23 20:17:48 +01:00
parent 9d4f278117
commit fed5a0fd87
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -48,6 +48,7 @@ public final class LuckPermsProvider {
* @throws IllegalStateException if the API is not loaded yet
*/
public static @NonNull LuckPerms get() {
LuckPerms instance = LuckPermsProvider.instance;
if (instance == null) {
throw new NotLoadedException();
}