2021-08-25 22:19:53 +02:00
|
|
|
--- a/com/mojang/brigadier/builder/ArgumentBuilder.java
|
|
|
|
+++ b/com/mojang/brigadier/builder/ArgumentBuilder.java
|
2024-12-13 17:02:13 +01:00
|
|
|
@@ -14,9 +_,17 @@
|
2021-08-25 22:19:53 +02:00
|
|
|
import java.util.function.Predicate;
|
|
|
|
|
|
|
|
public abstract class ArgumentBuilder<S, T extends ArgumentBuilder<S, T>> {
|
|
|
|
+ // Paper start - Vanilla command permission fixes
|
|
|
|
+ private static final Predicate<Object> DEFAULT_REQUIREMENT = s -> true;
|
|
|
|
+
|
|
|
|
+ @SuppressWarnings("unchecked")
|
|
|
|
+ public static <S> Predicate<S> defaultRequirement() {
|
|
|
|
+ return (Predicate<S>) DEFAULT_REQUIREMENT;
|
|
|
|
+ }
|
|
|
|
+ // Paper end - Vanilla command permission fixes
|
|
|
|
private final RootCommandNode<S> arguments = new RootCommandNode<>();
|
|
|
|
private Command<S> command;
|
|
|
|
- private Predicate<S> requirement = s -> true;
|
|
|
|
+ private Predicate<S> requirement = defaultRequirement(); // Paper - Vanilla command permission fixes
|
|
|
|
private CommandNode<S> target;
|
|
|
|
private RedirectModifier<S> modifier = null;
|
|
|
|
private boolean forks;
|