aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-vineflower-stripped/net/minecraft/server/rcon/RconConsoleSource.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/server/rcon/RconConsoleSource.java.patch')
-rw-r--r--patch-remap/mache-vineflower-stripped/net/minecraft/server/rcon/RconConsoleSource.java.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/server/rcon/RconConsoleSource.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/server/rcon/RconConsoleSource.java.patch
new file mode 100644
index 0000000000..90dbb187e4
--- /dev/null
+++ b/patch-remap/mache-vineflower-stripped/net/minecraft/server/rcon/RconConsoleSource.java.patch
@@ -0,0 +1,48 @@
+--- a/net/minecraft/server/rcon/RconConsoleSource.java
++++ b/net/minecraft/server/rcon/RconConsoleSource.java
+@@ -7,15 +8,23 @@
+ import net.minecraft.server.level.ServerLevel;
+ import net.minecraft.world.phys.Vec2;
+ import net.minecraft.world.phys.Vec3;
+-
++// CraftBukkit start
++import java.net.SocketAddress;
++import org.bukkit.craftbukkit.command.CraftRemoteConsoleCommandSender;
++// CraftBukkit end
+ public class RconConsoleSource implements CommandSource {
+ private static final String RCON = "Rcon";
+ private static final Component RCON_COMPONENT = Component.literal("Rcon");
+ private final StringBuffer buffer = new StringBuffer();
+ private final MinecraftServer server;
++ // CraftBukkit start
++ public final SocketAddress socketAddress;
++ private final CraftRemoteConsoleCommandSender remoteConsole = new CraftRemoteConsoleCommandSender(this);
+
+- public RconConsoleSource(MinecraftServer server) {
+- this.server = server;
++ public RconConsoleSource(MinecraftServer minecraftserver, SocketAddress socketAddress) {
++ this.socketAddress = socketAddress;
++ // CraftBukkit end
++ this.server = minecraftserver;
+ }
+
+ public void prepareForCommand() {
+@@ -33,7 +42,18 @@
+ );
+ }
+
++ // CraftBukkit start - Send a String
++ public void sendMessage(String message) {
++ this.buffer.append(message);
++ }
++
+ @Override
++ public org.bukkit.command.CommandSender getBukkitSender(CommandSourceStack wrapper) {
++ return this.remoteConsole;
++ }
++ // CraftBukkit end
++
++ @Override
+ public void sendSystemMessage(Component component) {
+ this.buffer.append(component.getString());
+ }