PaperMC/paper-server/patches/sources/net/minecraft/commands/CommandSource.java.patch
Nassim Jahnke f73e864f18
Commands
2024-12-13 21:21:57 +01:00

23 lines
746 B
Diff

--- a/net/minecraft/commands/CommandSource.java
+++ b/net/minecraft/commands/CommandSource.java
@@ -22,6 +_,13 @@
public boolean shouldInformAdmins() {
return false;
}
+
+ // CraftBukkit start
+ @Override
+ public org.bukkit.command.CommandSender getBukkitSender(CommandSourceStack stack) {
+ return io.papermc.paper.brigadier.NullCommandSender.INSTANCE; // Paper - expose a no-op CommandSender
+ }
+ // CraftBukkit end
};
void sendSystemMessage(Component component);
@@ -35,4 +_,6 @@
default boolean alwaysAccepts() {
return false;
}
+
+ org.bukkit.command.CommandSender getBukkitSender(CommandSourceStack wrapper); // CraftBukkit
}