Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-16 11:30:06 +01:00
SPIGOT-5502: Fix command block successcount being set to return value rather than actual count
Dieser Commit ist enthalten in:
Ursprung
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");
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren