@@ -9,9 +9,9 @@
|
||||
public abstract class CommandBlockListenerAbstract implements ICommandListener {
|
||||
|
||||
@@ -15,6 +16,10 @@
|
||||
private IChatBaseComponent f;
|
||||
private String g = "";
|
||||
private IChatBaseComponent h = new ChatComponentText("@");
|
||||
private IChatBaseComponent lastOutput;
|
||||
private String command = "";
|
||||
private IChatBaseComponent customName = new ChatComponentText("@");
|
||||
+ // CraftBukkit start
|
||||
+ @Override
|
||||
+ public abstract CommandSender getBukkitSender(CommandListenerWrapper wrapper);
|
||||
@@ -20,18 +20,18 @@
|
||||
public CommandBlockListenerAbstract() {}
|
||||
|
||||
@@ -102,14 +107,7 @@
|
||||
if (minecraftserver != null && minecraftserver.D() && minecraftserver.getEnableCommandBlock() && !UtilColor.b(this.g)) {
|
||||
if (minecraftserver != null && minecraftserver.E() && minecraftserver.getEnableCommandBlock() && !UtilColor.b(this.command)) {
|
||||
try {
|
||||
this.f = null;
|
||||
this.lastOutput = null;
|
||||
- CommandListenerWrapper commandlistenerwrapper = this.getWrapper().a((commandcontext, flag, i) -> {
|
||||
- if (flag) {
|
||||
- ++this.d;
|
||||
- ++this.successCount;
|
||||
- }
|
||||
-
|
||||
- });
|
||||
-
|
||||
- minecraftserver.getCommandDispatcher().a(commandlistenerwrapper, this.g);
|
||||
+ this.d = minecraftserver.getCommandDispatcher().dispatchServerCommand(this.getWrapper(), this.g); // CraftBukkit
|
||||
- minecraftserver.getCommandDispatcher().a(commandlistenerwrapper, this.command);
|
||||
+ this.successCount = minecraftserver.getCommandDispatcher().dispatchServerCommand(this.getWrapper(), this.command); // CraftBukkit
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.a(throwable, "Executing command block");
|
||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Command to be executed");
|
||||
@@ -44,6 +44,6 @@
|
||||
+ ichatbasecomponent = new ChatComponentText("@");
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
this.h = ichatbasecomponent;
|
||||
this.customName = ichatbasecomponent;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user