mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-04 22:22:18 -07:00
Update to Minecraft 1.12-pre2
This commit is contained in:
@@ -14,26 +14,26 @@
|
||||
public abstract class CommandBlockListenerAbstract implements ICommandListener {
|
||||
|
||||
private static final SimpleDateFormat a = new SimpleDateFormat("HH:mm:ss");
|
||||
@@ -13,6 +20,7 @@
|
||||
private String e = "";
|
||||
private String f = "@";
|
||||
private final CommandObjectiveExecutor g = new CommandObjectiveExecutor();
|
||||
@@ -15,6 +22,7 @@
|
||||
private String g = "";
|
||||
private String h = "@";
|
||||
private final CommandObjectiveExecutor i = new CommandObjectiveExecutor();
|
||||
+ protected org.bukkit.command.CommandSender sender; // CraftBukkit - add sender
|
||||
|
||||
public CommandBlockListenerAbstract() {}
|
||||
|
||||
@@ -92,7 +100,9 @@
|
||||
|
||||
try {
|
||||
this.d = null;
|
||||
- this.b = icommandhandler.a(this, this.e);
|
||||
+ // CraftBukkit start - Handle command block commands using Bukkit dispatcher
|
||||
+ this.b = executeSafely(this, sender, this.e);
|
||||
+ // CraftBukkit end
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.a(throwable, "Executing command block");
|
||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Command to be executed");
|
||||
@@ -124,6 +134,138 @@
|
||||
@@ -107,7 +115,9 @@
|
||||
if (minecraftserver != null && minecraftserver.M() && minecraftserver.getEnableCommandBlock()) {
|
||||
try {
|
||||
this.f = null;
|
||||
- this.d = minecraftserver.getCommandHandler().b(this, this.g);
|
||||
+ // CraftBukkit start - Handle command block commands using Bukkit dispatcher
|
||||
+ this.d = executeSafely(this, sender, this.g);
|
||||
+ // CraftBukkit end
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.a(throwable, "Executing command block");
|
||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Command to be executed");
|
||||
@@ -149,6 +159,138 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,5 +170,5 @@
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
public String getName() {
|
||||
return this.f;
|
||||
return this.h;
|
||||
}
|
||||
|
Reference in New Issue
Block a user