geforkt von Mirrors/Paper
Improve vanilla command handling for command blocks
By: Thinkofdeath <thinkofdeath@spigotmc.org>
Dieser Commit ist enthalten in:
Ursprung
520089d10e
Commit
930cad64fa
@ -1,5 +1,5 @@
|
|||||||
--- ../work/decompile-8eb82bde//net/minecraft/server/CommandBlockListenerAbstract.java 2014-11-28 17:43:42.989707437 +0000
|
--- ../work/decompile-8eb82bde//net/minecraft/server/CommandBlockListenerAbstract.java 2014-11-28 20:19:48.021499587 +0000
|
||||||
+++ src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java 2014-11-28 17:38:21.000000000 +0000
|
+++ src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java 2014-11-28 20:18:58.289500691 +0000
|
||||||
@@ -4,6 +4,13 @@
|
@@ -4,6 +4,13 @@
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
public CommandBlockListenerAbstract() {}
|
public CommandBlockListenerAbstract() {}
|
||||||
|
|
||||||
@@ -79,7 +87,109 @@
|
@@ -79,7 +87,110 @@
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.d = null;
|
this.d = null;
|
||||||
@ -53,12 +53,13 @@
|
|||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ // Handle vanilla commands;
|
+ // Handle vanilla commands;
|
||||||
|
+ org.bukkit.command.Command commandBlockCommand = commandMap.getCommand(args[0]);
|
||||||
+ if (minecraftserver.server.getCommandBlockOverride(args[0])) {
|
+ if (minecraftserver.server.getCommandBlockOverride(args[0])) {
|
||||||
+ org.bukkit.command.Command commandBlockCommand = commandMap.getCommand("minecraft:" + args[0]);
|
+ commandBlockCommand = commandMap.getCommand("minecraft:" + args[0]);
|
||||||
+ if (commandBlockCommand instanceof VanillaCommandWrapper) {
|
+ }
|
||||||
+ this.b = ((VanillaCommandWrapper) commandBlockCommand).dispatchVanillaCommandBlock(this, this.e);
|
+ if (commandBlockCommand instanceof VanillaCommandWrapper) {
|
||||||
+ return;
|
+ this.b = ((VanillaCommandWrapper) commandBlockCommand).dispatchVanillaCommandBlock(this, this.e);
|
||||||
+ }
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ // Make sure this is a valid command
|
+ // Make sure this is a valid command
|
||||||
@ -133,7 +134,7 @@
|
|||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
CrashReport crashreport = CrashReport.a(throwable, "Executing command block");
|
CrashReport crashreport = CrashReport.a(throwable, "Executing command block");
|
||||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Command to be executed");
|
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Command to be executed");
|
||||||
@@ -91,8 +201,26 @@
|
@@ -91,8 +202,26 @@
|
||||||
} else {
|
} else {
|
||||||
this.b = 0;
|
this.b = 0;
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren