use of net.luckperms.api.cacheddata.CachedPermissionData in project AuthMeReloaded by AuthMe.
the class LuckPermsHandler method hasPermissionOffline.
@Override
public boolean hasPermissionOffline(String name, PermissionNode node) {
User user = luckPerms.getUserManager().getUser(name);
if (user == null) {
logger.warning("LuckPermsHandler: tried to check permission for offline user " + name + " but it isn't loaded!");
return false;
}
CachedPermissionData permissionData = user.getCachedData().getPermissionData(QueryOptions.builder(QueryMode.CONTEXTUAL).build());
return permissionData.checkPermission(node.getNode()).asBoolean();
}
Aggregations