--- a/com/mojang/brigadier/builder/ArgumentBuilder.java +++ b/com/mojang/brigadier/builder/ArgumentBuilder.java @@ -14,9 +14,17 @@ import java.util.function.Predicate; public abstract class ArgumentBuilder> { + // Paper start - Vanilla command permission fixes + private static final Predicate DEFAULT_REQUIREMENT = s -> true; + + @SuppressWarnings("unchecked") + public static Predicate defaultRequirement() { + return (Predicate) DEFAULT_REQUIREMENT; + } + // Paper end - Vanilla command permission fixes private final RootCommandNode arguments = new RootCommandNode<>(); private Command command; - private Predicate requirement = s -> true; + private Predicate requirement = defaultRequirement(); // Paper - Vanilla command permission fixes private CommandNode target; private RedirectModifier modifier = null; private boolean forks;