2018-07-19 06:42:43 +02:00
|
|
|
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.
|
|
|
|
|
2019-04-27 05:05:36 +02:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/DedicatedServerProperties.java
|
2020-05-06 11:48:49 +02:00
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
2019-04-27 05:05:36 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/DedicatedServerProperties.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/DedicatedServerProperties.java
|
|
|
|
@@ -0,0 +0,0 @@ public class DedicatedServerProperties extends PropertyManager<DedicatedServerPr
|
|
|
|
public final PropertyManager<DedicatedServerProperties>.EditableProperty<Boolean> whiteList;
|
2020-06-25 13:00:35 +02:00
|
|
|
public final GeneratorSettings generatorSettings;
|
2019-04-27 05:05:36 +02:00
|
|
|
|
|
|
|
+ public final String rconIp; // Paper - Add rcon ip
|
|
|
|
+
|
|
|
|
// CraftBukkit start
|
2020-08-25 04:22:08 +02:00
|
|
|
public DedicatedServerProperties(Properties properties, IRegistryCustom iregistrycustom, OptionSet optionset) {
|
2019-04-27 05:05:36 +02:00
|
|
|
super(properties, optionset);
|
|
|
|
@@ -0,0 +0,0 @@ public class DedicatedServerProperties extends PropertyManager<DedicatedServerPr
|
2020-11-03 03:22:15 +01:00
|
|
|
this.textFilteringConfig = this.getString("text-filtering-config", "");
|
2019-04-27 05:05:36 +02:00
|
|
|
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
|
2020-08-25 04:22:08 +02:00
|
|
|
this.generatorSettings = GeneratorSettings.a(iregistrycustom, properties);
|
2019-04-27 05:05:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PropertyManager.java b/src/main/java/net/minecraft/server/PropertyManager.java
|
2020-05-06 11:48:49 +02:00
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
2019-04-27 05:05:36 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/PropertyManager.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/PropertyManager.java
|
|
|
|
@@ -0,0 +0,0 @@ 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
|
|
|
|
}
|
|
|
|
|
2018-07-19 06:42:43 +02:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/RemoteControlListener.java b/src/main/java/net/minecraft/server/RemoteControlListener.java
|
2020-05-06 11:48:49 +02:00
|
|
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
2018-07-19 06:42:43 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/RemoteControlListener.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/RemoteControlListener.java
|
|
|
|
@@ -0,0 +0,0 @@ public class RemoteControlListener extends RemoteConnectionThread {
|
2020-08-25 04:22:08 +02:00
|
|
|
@Nullable
|
|
|
|
public static RemoteControlListener a(IMinecraftServer iminecraftserver) {
|
|
|
|
DedicatedServerProperties dedicatedserverproperties = iminecraftserver.getDedicatedServerProperties();
|
|
|
|
- String s = iminecraftserver.h_();
|
|
|
|
+ String s = dedicatedserverproperties.rconIp; // Paper - Configurable rcon ip
|
2019-04-27 05:05:36 +02:00
|
|
|
|
2020-08-25 04:22:08 +02:00
|
|
|
if (s.isEmpty()) {
|
|
|
|
s = "0.0.0.0";
|