mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-07 16:57:42 +01:00
36 lines
1.4 KiB
Diff
36 lines
1.4 KiB
Diff
--- a/net/minecraft/server/rcon/RconConsoleSource.java
|
|
+++ b/net/minecraft/server/rcon/RconConsoleSource.java
|
|
@@ -13,8 +_,13 @@
|
|
private static final Component RCON_COMPONENT = Component.literal("Rcon");
|
|
private final StringBuffer buffer = new StringBuffer();
|
|
private final MinecraftServer server;
|
|
+ // CraftBukkit start
|
|
+ public final java.net.SocketAddress socketAddress;
|
|
+ private final org.bukkit.craftbukkit.command.CraftRemoteConsoleCommandSender remoteConsole = new org.bukkit.craftbukkit.command.CraftRemoteConsoleCommandSender(this);
|
|
|
|
- public RconConsoleSource(MinecraftServer server) {
|
|
+ public RconConsoleSource(MinecraftServer server, java.net.SocketAddress socketAddress) {
|
|
+ this.socketAddress = socketAddress;
|
|
+ // CraftBukkit end
|
|
this.server = server;
|
|
}
|
|
|
|
@@ -32,6 +_,17 @@
|
|
this, Vec3.atLowerCornerOf(serverLevel.getSharedSpawnPos()), Vec2.ZERO, serverLevel, 4, "Rcon", RCON_COMPONENT, this.server, null
|
|
);
|
|
}
|
|
+
|
|
+ // 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) {
|