Paper/Spigot-Server-Patches/0089-Configurable-RCON-IP-address.patch
Daniel Ennis c97ce029e9
1.16.2 Release (#4123)
PaperMC believes that 1.16.2 is now ready for general release as we fixed the main issue plagueing the 1.16.x release, the MapLike data conversion issues.

Until now, it was not safe for a server to convert a world to 1.16.2 without data conversion issues around villages and potentially other things. If you did, those MapLike errors meant something went wrong.

This is now resolved.

Big thanks to all those that helped, notably @BillyGalbreath and @Proximyst who did large parts of the update process with me.

Please as always, backup your worlds and test before updating to 1.16.2!

If you update to 1.16.2, there is no going back to an older build than this.

---------------------------------

Co-authored-by: William Blake Galbreath <Blake.Galbreath@GMail.com>
Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com>
Co-authored-by: krolik-exe <69214078+krolik-exe@users.noreply.github.com>
Co-authored-by: BillyGalbreath <BillyGalbreath@users.noreply.github.com>
Co-authored-by: stonar96 <minecraft.stonar96@gmail.com>
Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
Co-authored-by: Jason <jasonpenilla2@me.com>
Co-authored-by: kashike <kashike@vq.lc>
Co-authored-by: Aurora <21148213+aurorasmiles@users.noreply.github.com>
Co-authored-by: KennyTV <kennytv@t-online.de>
Co-authored-by: commandblockguy <commandblockguy1@gmail.com>
Co-authored-by: DigitalRegent <misterwener@gmail.com>
Co-authored-by: ishland <ishlandmc@yeah.net>
2020-08-24 22:40:19 -04:00

60 lines
3.2 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 16 Apr 2016 00:39:33 -0400
Subject: [PATCH] Configurable RCON IP address
For servers with multiple IP's, ability to bind to a specific interface.
diff --git a/src/main/java/net/minecraft/server/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/DedicatedServerProperties.java
index 834330e97326f8f739c9358234b64c685b80025c..0aa8448d25f743a0d12e4c7f7c9c04fd9d5d0088 100644
--- a/src/main/java/net/minecraft/server/DedicatedServerProperties.java
+++ b/src/main/java/net/minecraft/server/DedicatedServerProperties.java
@@ -56,6 +56,8 @@ public class DedicatedServerProperties extends PropertyManager<DedicatedServerPr
public final PropertyManager<DedicatedServerProperties>.EditableProperty<Boolean> whiteList;
public final GeneratorSettings generatorSettings;
+ public final String rconIp; // Paper - Add rcon ip
+
// CraftBukkit start
public DedicatedServerProperties(Properties properties, IRegistryCustom iregistrycustom, OptionSet optionset) {
super(properties, optionset);
@@ -106,6 +108,10 @@ public class DedicatedServerProperties extends PropertyManager<DedicatedServerPr
}, 100);
this.playerIdleTimeout = this.b("player-idle-timeout", 0);
this.whiteList = this.b("white-list", false);
+ // Paper start - Configurable rcon ip
+ final String rconIp = this.getSettingIfExists("rcon.ip");
+ this.rconIp = rconIp == null ? this.serverIp : rconIp;
+ // Paper end
this.generatorSettings = GeneratorSettings.a(iregistrycustom, properties);
}
diff --git a/src/main/java/net/minecraft/server/PropertyManager.java b/src/main/java/net/minecraft/server/PropertyManager.java
index 3aa05fd2b38562039960b58cab0ea40743ef06bb..2170d539a72a3e254a688e6148b282975e84e491 100644
--- a/src/main/java/net/minecraft/server/PropertyManager.java
+++ b/src/main/java/net/minecraft/server/PropertyManager.java
@@ -127,8 +127,8 @@ public abstract class PropertyManager<T extends PropertyManager<T>> {
};
}
- @Nullable
- private String c(String s) {
+ @Nullable String getSettingIfExists(final String path) { return this.c(path); } // Paper - OBFHELPER
+ @Nullable private String c(String s) { // Paper - OBFHELPER
return (String) getOverride(s, this.properties.getProperty(s)); // CraftBukkit
}
diff --git a/src/main/java/net/minecraft/server/RemoteControlListener.java b/src/main/java/net/minecraft/server/RemoteControlListener.java
index 44afacf7ebbdf09a25189cc636e9c8149e03c9f2..8006659f167879863b5e89e527813e6f664e90d6 100644
--- a/src/main/java/net/minecraft/server/RemoteControlListener.java
+++ b/src/main/java/net/minecraft/server/RemoteControlListener.java
@@ -60,7 +60,7 @@ public class RemoteControlListener extends RemoteConnectionThread {
@Nullable
public static RemoteControlListener a(IMinecraftServer iminecraftserver) {
DedicatedServerProperties dedicatedserverproperties = iminecraftserver.getDedicatedServerProperties();
- String s = iminecraftserver.h_();
+ String s = dedicatedserverproperties.rconIp; // Paper - Configurable rcon ip
if (s.isEmpty()) {
s = "0.0.0.0";