package com.bwfcwalshy.flarebot.permissions;

import java.util.Arrays;
import java.util.function.Predicate;
import java.util.regex.Pattern;
import java.util.stream.Collectors;

public class PermissionNode implements Predicate<PermissionNode> {

    private final String node;

    public PermissionNode(String node) {
        this.node = node;
    }

    public String getNode() {
        return node;
    }

    @Override
    public boolean test(PermissionNode node) {
        // It splits by a `*` that's on a start of a string or has . around them
        String textNode = Arrays.stream(getNode().split("(?:^\\*(\\.))|(?:(?<=\\.)\\*(?=\\.))"))
                // Then it escapes all of that so its not regexps
                .map(Pattern::quote)
                // And then it joins them with a match all regexp
                .collect(Collectors.joining(".+"));
        // And then it lets Java REGEXP compare them. Ty @I-Al-Istannen for making me do this comment
        return node.getNode().matches(textNode);
    }
}

@@ -455,32 +455,91 @@
 ionNode node) %7B%0A
+        if(getNode().equals(%22*%22))%0A            return true;%0A
         // It sp

Fix the wildcard issue