Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 11:00:06 +01:00
b31089a929
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: d264e972 #591: Add option for a consumer before spawning an item 1c537fce #590: Add spawn and transform reasons for piglin zombification. CraftBukkit Changes: ee5006d1 #810: Add option for a consumer before spawning an item f6a39d3c #809: Add spawn and transform reasons for piglin zombification. 0c24068a Organise imports Spigot Changes: bff52619 Organise imports
60 Zeilen
3.3 KiB
Diff
60 Zeilen
3.3 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 ebeea0df593bc82e7740203bec6b45e16318ab35..205d56f88440789df8a028b3827dd388fea56f63 100644
|
|
--- a/src/main/java/net/minecraft/server/DedicatedServerProperties.java
|
|
+++ b/src/main/java/net/minecraft/server/DedicatedServerProperties.java
|
|
@@ -61,6 +61,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);
|
|
@@ -112,6 +114,10 @@ public class DedicatedServerProperties extends PropertyManager<DedicatedServerPr
|
|
this.textFilteringConfig = this.getString("text-filtering-config", "");
|
|
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";
|