Update to Minecraft 1.12-pre2

This commit is contained in:
md_5
2017-05-14 12:00:00 +10:00
parent 6e3cec8bc7
commit 5195487ec6
210 changed files with 2280 additions and 1974 deletions

View File

@@ -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;
}