PaperMC/nms-patches/CommandBlockListenerAbstract.patch
2020-06-25 10:00:00 +10:00

30 lines
1.3 KiB
Diff

--- a/net/minecraft/server/CommandBlockListenerAbstract.java
+++ b/net/minecraft/server/CommandBlockListenerAbstract.java
@@ -4,6 +4,7 @@
import java.util.Date;
import java.util.UUID;
import javax.annotation.Nullable;
+import org.bukkit.command.CommandSender;
public abstract class CommandBlockListenerAbstract implements ICommandListener {
@@ -17,6 +18,10 @@
private IChatBaseComponent lastOutput;
private String command = "";
private IChatBaseComponent customName;
+ // CraftBukkit start
+ @Override
+ public abstract CommandSender getBukkitSender(CommandListenerWrapper wrapper);
+ // CraftBukkit end
public CommandBlockListenerAbstract() {
this.customName = CommandBlockListenerAbstract.c;
@@ -113,7 +118,7 @@
});
- minecraftserver.getCommandDispatcher().a(commandlistenerwrapper, this.command);
+ minecraftserver.getCommandDispatcher().dispatchServerCommand(commandlistenerwrapper, this.command); // CraftBukkit
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Executing command block");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Command to be executed");