mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2025-01-01 14:07:56 +01:00
Fix NPE from null primary group in Vault hook (#3103)
This commit is contained in:
parent
cfb298f69b
commit
5a377e713e
@ -254,6 +254,9 @@ public class LuckPermsVaultPermission extends AbstractVaultPermission {
|
|||||||
QueryOptions queryOptions = getQueryOptions(uuid, world);
|
QueryOptions queryOptions = getQueryOptions(uuid, world);
|
||||||
MetaCache metaData = user.getCachedData().getMetaData(queryOptions);
|
MetaCache metaData = user.getCachedData().getMetaData(queryOptions);
|
||||||
String value = metaData.getPrimaryGroup(MetaCheckEvent.Origin.THIRD_PARTY_API);
|
String value = metaData.getPrimaryGroup(MetaCheckEvent.Origin.THIRD_PARTY_API);
|
||||||
|
if (value == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
Group group = getGroup(value);
|
Group group = getGroup(value);
|
||||||
return group != null ? groupName(group) : value;
|
return group != null ? groupName(group) : value;
|
||||||
|
Loading…
Reference in New Issue
Block a user