add warning if luckperms user is null

This commit is contained in:
ajgeiss0702
2022-04-15 08:22:41 -07:00
parent 02f23b8990
commit 44e996ba6f
@@ -37,7 +37,12 @@ public class LuckPermsHook implements PermissionHook {
User user = api.getUserManager().getUser(player.getUniqueId());
assert user != null;
if(user == null) {
main.getLogger().warn("LuckPerms doesnt seem to have data loaded for "+player.getName()+"!" +
"Because of this I can't load priority permissions. Acting like "+player.getName()+" doesnt have any.");
return Collections.emptyList();
}
SortedSet<Node> nodes = user.resolveDistinctInheritedNodes(QueryOptions.nonContextual());
List<String> perms = new ArrayList<>();