1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-02-16 18:31:53 +01:00

Fix loading cmds in datapacks ()

This commit is contained in:
Jake Potrebic 2021-10-08 20:39:59 -07:00
parent 4675996335
commit 38aa835018

View file

@ -40,7 +40,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // 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