Fix calling UnknownCommandEvent (#8232)

This commit is contained in:
Jake Potrebic
2023-02-16 18:07:30 -08:00
parent 8242b76d95
commit 5d777995f4
3 changed files with 91 additions and 9 deletions

View File

@@ -37,10 +37,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/commands/Commands.java
+++ b/src/main/java/net/minecraft/commands/Commands.java
@@ -0,0 +0,0 @@ public class Commands {
if (environment.includeIntegrated) {
PublishCommand.register(this.dispatcher);
}
-
this.vanillaCommandNodes.addAll(this.dispatcher.getRoot().getChildren()); // Paper
+ // Paper start
+ for (final CommandNode<CommandSourceStack> node : this.dispatcher.getRoot().getChildren()) {
+ if (node.getRequirement() == com.mojang.brigadier.builder.ArgumentBuilder.<CommandSourceStack>defaultRequirement()) {