mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 03:32:46 +01:00
backport: fix loading cmds in datapacks (#6793)
This commit is contained in:
parent
7f332fab84
commit
42e2f67b29
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue