public boolean removeIf(DataType dataType, @Nullable ContextSet contextSet, Predicate<? super Node> predicate, boolean giveDefault) {
        Difference<Node> changes;
        if (contextSet == null) {
            changes = getData(dataType).removeIf(predicate);
        } else {
            changes = getData(dataType).removeIf(contextSet, predicate);
        }

        if (changes.isEmpty()) {
            return false;
        }

        if (getType() == HolderType.USER && giveDefault) {
            getPlugin().getUserManager().giveDefaultIfNeeded((User) this);
        }

        invalidateCache();
        this.plugin.getEventDispatcher().dispatchNodeClear(this, dataType, changes);
        return true;
    }
Removes temporary permissions that have expired

@return true if permissions had expired and were removed
common/src/main/java/me/lucko/luckperms/common/model/PermissionHolder.java