2020-05-02 00:03:47 +02:00
|
|
|
From 2f6eb4e6e9fa1f88646a2026a1d3330e79f36d50 Mon Sep 17 00:00:00 2001
|
2019-04-27 05:05:36 +02:00
|
|
|
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
|
2020-04-02 23:07:06 +02:00
|
|
|
index ad1e3508a7..0c3ec83570 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
|
2019-07-20 06:01:24 +02:00
|
|
|
@@ -54,6 +54,8 @@ public class DedicatedServerProperties extends PropertyManager<DedicatedServerPr
|
2019-04-27 05:05:36 +02:00
|
|
|
public final PropertyManager<DedicatedServerProperties>.EditableProperty<Integer> playerIdleTimeout;
|
|
|
|
public final PropertyManager<DedicatedServerProperties>.EditableProperty<Boolean> whiteList;
|
|
|
|
|
|
|
|
+ public final String rconIp; // Paper - Add rcon ip
|
|
|
|
+
|
|
|
|
// CraftBukkit start
|
|
|
|
public DedicatedServerProperties(Properties properties, OptionSet optionset) {
|
|
|
|
super(properties, optionset);
|
2019-07-20 06:01:24 +02:00
|
|
|
@@ -100,6 +102,10 @@ public class DedicatedServerProperties extends PropertyManager<DedicatedServerPr
|
2019-04-27 05:05:36 +02:00
|
|
|
}, 29999984);
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
|
|
// CraftBukkit start
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/PropertyManager.java b/src/main/java/net/minecraft/server/PropertyManager.java
|
2020-04-02 23:07:06 +02:00
|
|
|
index d7e81a6d99..729455ce53 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
|
|
|
|
@@ -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
|
2020-04-02 23:07:06 +02:00
|
|
|
index e48d6dcd74..2ce490be00 100644
|
2019-04-27 05:05:36 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/RemoteControlListener.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/RemoteControlListener.java
|
|
|
|
@@ -25,7 +25,7 @@ public class RemoteControlListener extends RemoteConnectionThread {
|
|
|
|
|
|
|
|
this.h = dedicatedserverproperties.rconPort;
|
|
|
|
this.k = dedicatedserverproperties.rconPassword;
|
|
|
|
- this.i = iminecraftserver.e_();
|
|
|
|
+ this.i = dedicatedserverproperties.rconIp; // Paper - Configurable rcon ip
|
|
|
|
if (this.i.isEmpty()) {
|
|
|
|
this.i = "0.0.0.0";
|
|
|
|
}
|
|
|
|
--
|
2020-05-02 00:03:47 +02:00
|
|
|
2.26.2
|
2019-04-27 05:05:36 +02:00
|
|
|
|