From ffc2b251af86dfbb1c08b0bcbfdf15690b849032 Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 18 Jun 2020 07:41:02 +1000 Subject: [PATCH] Revert "#675: Fix redirected CommandNodes sometimes not being properly redirected" This reverts commit cb701f6b6321ac3cf1d7ccc2c1245dee736d786a. --- nms-patches/CommandDispatcher.patch | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/nms-patches/CommandDispatcher.patch b/nms-patches/CommandDispatcher.patch index cc91a0478..f199c5b4f 100644 --- a/nms-patches/CommandDispatcher.patch +++ b/nms-patches/CommandDispatcher.patch @@ -140,20 +140,10 @@ argumentbuilder.requires((icompletionprovider) -> { return true; -@@ -218,11 +297,15 @@ - } +@@ -222,7 +301,7 @@ + argumentbuilder.redirect((CommandNode) map.get(argumentbuilder.getRedirect())); } -- if (argumentbuilder.getRedirect() != null) { -- argumentbuilder.redirect((CommandNode) map.get(argumentbuilder.getRedirect())); -+ // Craftbukkit start - fix redirected CommandNodes not being properly redirected if it is mapped after commandNode2 -+ CommandNode destination = commandnode2.getRedirect(); -+ if (destination != null) { -+ this.a(destination, (CommandNode) destination.createBuilder().build(), commandlistenerwrapper, map); -+ argumentbuilder.redirect((CommandNode) map.get(destination)); - } -+ // Craftbukkit end - - CommandNode commandnode3 = argumentbuilder.build(); + CommandNode commandnode3 = argumentbuilder.build(); // CraftBukkit - decompile error