From 771aa3ec89c1c684b2e94e84d88eff9e3cda3d78 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Thu, 6 Apr 2023 17:27:41 -0700 Subject: [PATCH] Fix unknown cmd msg for mc namespaced cmds (#9059) --- patches/server/Add-UnknownCommandEvent.patch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/patches/server/Add-UnknownCommandEvent.patch b/patches/server/Add-UnknownCommandEvent.patch index 21e097112f..3f33774eaa 100644 --- a/patches/server/Add-UnknownCommandEvent.patch +++ b/patches/server/Add-UnknownCommandEvent.patch @@ -87,13 +87,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -0,0 +0,0 @@ public final class CraftServer implements Server { - - if (command instanceof VanillaCommandWrapper) { - LiteralCommandNode node = (LiteralCommandNode) ((VanillaCommandWrapper) command).vanillaCommand; + } + node = clone; + } + dispatcher.vanillaCommandNodes.add(node); // Paper - if (!node.getLiteral().equals(label)) { - LiteralCommandNode clone = new LiteralCommandNode(label, node.getCommand(), node.getRequirement(), node.getRedirect(), node.getRedirectModifier(), node.isFork()); + dispatcher.getDispatcher().getRoot().addChild(node); + } else { @@ -0,0 +0,0 @@ public final class CraftServer implements Server { // Spigot start