From b98e2defcb4037874c2bc37e6b049e5ab5f8d8af Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 6 Jan 2020 13:44:16 +1100 Subject: [PATCH] SPIGOT-5502: Fix command block successcount being set to return value rather than actual count --- nms-patches/CommandBlockListenerAbstract.patch | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/nms-patches/CommandBlockListenerAbstract.patch b/nms-patches/CommandBlockListenerAbstract.patch index 6c024518b2..b04ba4f70a 100644 --- a/nms-patches/CommandBlockListenerAbstract.patch +++ b/nms-patches/CommandBlockListenerAbstract.patch @@ -19,19 +19,12 @@ public CommandBlockListenerAbstract() { this.customName = CommandBlockListenerAbstract.c; -@@ -105,14 +110,7 @@ - if (minecraftserver != null && minecraftserver.J() && minecraftserver.getEnableCommandBlock() && !UtilColor.b(this.command)) { - try { - this.lastOutput = null; -- CommandListenerWrapper commandlistenerwrapper = this.getWrapper().a((commandcontext, flag, i) -> { -- if (flag) { -- ++this.successCount; -- } -- -- }); -- +@@ -112,7 +117,7 @@ + + }); + - minecraftserver.getCommandDispatcher().a(commandlistenerwrapper, this.command); -+ this.successCount = minecraftserver.getCommandDispatcher().dispatchServerCommand(this.getWrapper(), this.command); // CraftBukkit ++ minecraftserver.getCommandDispatcher().dispatchServerCommand(commandlistenerwrapper, this.command); // CraftBukkit } catch (Throwable throwable) { CrashReport crashreport = CrashReport.a(throwable, "Executing command block"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Command to be executed");