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