aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJake Potrebic <[email protected]>2021-10-08 20:39:59 -0700
committerGitHub <[email protected]>2021-10-08 20:39:59 -0700
commit523a55c609e0b939b8fb15793f851503cea8da28 (patch)
treeac5e78570be300f2f138fb4b8ecc6b5f241a8ff6
parent381a1462b33eb22c2c37b1ae0d2e5f4379243c74 (diff)
downloadPaper-523a55c609e0b939b8fb15793f851503cea8da28.tar.gz
Paper-523a55c609e0b939b8fb15793f851503cea8da28.zip
Fix loading cmds in datapacks (#6641)
-rw-r--r--patches/server/0745-Vanilla-command-permission-fixes.patch4
1 files changed, 2 insertions, 2 deletions
diff --git a/patches/server/0745-Vanilla-command-permission-fixes.patch b/patches/server/0745-Vanilla-command-permission-fixes.patch
index 4b200f28e9..46e803d4e5 100644
--- a/patches/server/0745-Vanilla-command-permission-fixes.patch
+++ b/patches/server/0745-Vanilla-command-permission-fixes.patch
@@ -30,7 +30,7 @@ index 899008b2980d13f1be6280cd8cb959c53a29bebf..f875507241ac6769545e91cd3285232b
private RedirectModifier<S> modifier = null;
private boolean forks;
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
-index 816ea85a5880123c970d227d61426a0ae2b9539f..6fec6a47538da4c0c5a4505e9bedf492bb3376dd 100644
+index 816ea85a5880123c970d227d61426a0ae2b9539f..b7c24a7ff4dc50d03f74b21a0b353d0ce559b4d4 100644
--- a/src/main/java/net/minecraft/commands/Commands.java
+++ b/src/main/java/net/minecraft/commands/Commands.java
@@ -204,6 +204,13 @@ public class Commands {
@@ -40,7 +40,7 @@ index 816ea85a5880123c970d227d61426a0ae2b9539f..6fec6a47538da4c0c5a4505e9bedf492
+ // Paper start
+ for (final CommandNode<CommandSourceStack> node : this.dispatcher.getRoot().getChildren()) {
+ if (node.getRequirement() == com.mojang.brigadier.builder.ArgumentBuilder.<CommandSourceStack>defaultRequirement()) {
-+ node.requirement = stack -> stack.getBukkitSender().hasPermission(org.bukkit.craftbukkit.command.VanillaCommandWrapper.getPermission(node));
++ node.requirement = stack -> stack.source == CommandSource.NULL || stack.getBukkitSender().hasPermission(org.bukkit.craftbukkit.command.VanillaCommandWrapper.getPermission(node));
+ }
+ }
+ // Paper end