mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-10 20:59:54 +01:00
SPIGOT-5502: Fix command block successcount being set to return value rather than actual count
This commit is contained in:
parent
2fd7964587
commit
b98e2defcb
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user