diff options
author | Jake Potrebic <[email protected]> | 2021-10-18 15:01:41 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2021-10-18 15:01:41 -0700 |
commit | 42e2f67b292ae075cf419832ebf52bcc09e1725f (patch) | |
tree | eda0e326ca7187ad615f07b6fd2af0423bef9264 | |
parent | 7f332fab84b02a3975131bfc23a123ccffa39c39 (diff) | |
download | Paper-42e2f67b292ae075cf419832ebf52bcc09e1725f.tar.gz Paper-42e2f67b292ae075cf419832ebf52bcc09e1725f.zip |
backport: fix loading cmds in datapacks (#6793)
-rw-r--r-- | Spigot-Server-Patches/0764-Vanilla-command-permission-fixes.patch | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Spigot-Server-Patches/0764-Vanilla-command-permission-fixes.patch b/Spigot-Server-Patches/0764-Vanilla-command-permission-fixes.patch index a6d8340686..cd30f8902e 100644 --- a/Spigot-Server-Patches/0764-Vanilla-command-permission-fixes.patch +++ b/Spigot-Server-Patches/0764-Vanilla-command-permission-fixes.patch @@ -43,7 +43,7 @@ index c0fac7369b111e65b896a15848ae22457e5e8914..fd310f5d009801492def4af943322a3b private final RedirectModifier<S> modifier; private final boolean forks; diff --git a/src/main/java/net/minecraft/commands/CommandDispatcher.java b/src/main/java/net/minecraft/commands/CommandDispatcher.java -index 4270a9bbc272706b5a88807d465a32e73d18b90f..077beec1c1f0ae99854fe9e57fccfaaa94bbfd33 100644 +index 4270a9bbc272706b5a88807d465a32e73d18b90f..3d255c2ed31d7267bb6cd789702063671d785018 100644 --- a/src/main/java/net/minecraft/commands/CommandDispatcher.java +++ b/src/main/java/net/minecraft/commands/CommandDispatcher.java @@ -197,6 +197,13 @@ public class CommandDispatcher { @@ -53,7 +53,7 @@ index 4270a9bbc272706b5a88807d465a32e73d18b90f..077beec1c1f0ae99854fe9e57fccfaaa + // Paper start + for (final CommandNode<CommandListenerWrapper> node : this.dispatcher().getRoot().getChildren()) { + if (node.getRequirement() == com.mojang.brigadier.builder.ArgumentBuilder.<CommandListenerWrapper>defaultRequirement()) { -+ node.requirement = stack -> stack.getBukkitSender().hasPermission(org.bukkit.craftbukkit.command.VanillaCommandWrapper.getPermission(node)); ++ node.requirement = stack -> stack.base == ICommandListener.DUMMY || stack.getBukkitSender().hasPermission(org.bukkit.craftbukkit.command.VanillaCommandWrapper.getPermission(node)); + } + } + // Paper end |