Paper/nms-patches/CommandBlockListenerAbstract.patch

31 lines
1.3 KiB
Diff
Raw Normal View History

2015-05-25 12:37:24 +02:00
--- a/net/minecraft/server/CommandBlockListenerAbstract.java
+++ b/net/minecraft/server/CommandBlockListenerAbstract.java
2018-12-25 22:00:00 +01:00
@@ -4,6 +4,7 @@
import java.util.Date;
2020-06-25 02:00:00 +02:00
import java.util.UUID;
2016-05-10 13:47:39 +02:00
import javax.annotation.Nullable;
2017-06-26 00:27:25 +02:00
+import org.bukkit.command.CommandSender;
2018-07-15 02:00:00 +02:00
public abstract class CommandBlockListenerAbstract implements ICommandListener {
2020-06-25 02:00:00 +02:00
@@ -17,6 +18,10 @@
2019-04-23 04:00:00 +02:00
private IChatBaseComponent lastOutput;
private String command = "";
2019-12-10 23:00:00 +01:00
private IChatBaseComponent customName;
2018-07-15 02:00:00 +02:00
+ // CraftBukkit start
+ @Override
+ public abstract CommandSender getBukkitSender(CommandListenerWrapper wrapper);
+ // CraftBukkit end
2019-12-10 23:00:00 +01:00
public CommandBlockListenerAbstract() {
this.customName = CommandBlockListenerAbstract.c;
2020-06-25 02:00:00 +02:00
@@ -113,7 +118,7 @@
});
2019-04-23 04:00:00 +02:00
- minecraftserver.getCommandDispatcher().a(commandlistenerwrapper, this.command);
+ minecraftserver.getCommandDispatcher().dispatchServerCommand(commandlistenerwrapper, this.command); // CraftBukkit
2017-05-14 04:00:00 +02:00
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Executing command block");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Command to be executed");