mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 11:24:11 +01:00
65 lines
4 KiB
Diff
65 lines
4 KiB
Diff
--- a/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
|
+++ b/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
|
@@ -45,6 +_,7 @@
|
|
static final Logger LOGGER = LogUtils.getLogger();
|
|
private static final Pattern SHA1 = Pattern.compile("^[a-fA-F0-9]{40}$");
|
|
private static final Splitter COMMA_SPLITTER = Splitter.on(',').trimResults();
|
|
+ public final boolean debug = this.get("debug", false); // CraftBukkit
|
|
public final boolean onlineMode = this.get("online-mode", true);
|
|
public final boolean preventProxyConnections = this.get("prevent-proxy-connections", false);
|
|
public final String serverIp = this.get("server-ip", "");
|
|
@@ -85,7 +_,7 @@
|
|
public final boolean broadcastRconToOps = this.get("broadcast-rcon-to-ops", true);
|
|
public final boolean broadcastConsoleToOps = this.get("broadcast-console-to-ops", true);
|
|
public final int maxWorldSize = this.get("max-world-size", property -> Mth.clamp(property, 1, 29999984), 29999984);
|
|
- public final boolean syncChunkWrites = this.get("sync-chunk-writes", true);
|
|
+ public final boolean syncChunkWrites = this.get("sync-chunk-writes", true) && Boolean.getBoolean("Paper.enable-sync-chunk-writes"); // Paper - Hide sync chunk writes behind flag
|
|
public final String regionFileComression = this.get("region-file-compression", "deflate");
|
|
public final boolean enableJmxMonitoring = this.get("enable-jmx-monitoring", false);
|
|
public final boolean enableStatus = this.get("enable-status", true);
|
|
@@ -99,13 +_,16 @@
|
|
public final Settings<DedicatedServerProperties>.MutableValue<Boolean> whiteList = this.getMutable("white-list", false);
|
|
public final boolean enforceSecureProfile = this.get("enforce-secure-profile", true);
|
|
public final boolean logIPs = this.get("log-ips", true);
|
|
- public int pauseWhenEmptySeconds = this.get("pause-when-empty-seconds", 60);
|
|
+ public int pauseWhenEmptySeconds = this.get("pause-when-empty-seconds", -1); // Paper - disable tick sleeping by default
|
|
private final DedicatedServerProperties.WorldDimensionData worldDimensionData;
|
|
public final WorldOptions worldOptions;
|
|
public boolean acceptsTransfers = this.get("accepts-transfers", false);
|
|
+ public final String rconIp; // Paper - Configurable rcon ip
|
|
|
|
- public DedicatedServerProperties(Properties properties) {
|
|
- super(properties);
|
|
+ // CraftBukkit start
|
|
+ public DedicatedServerProperties(Properties properties, joptsimple.OptionSet optionset) {
|
|
+ super(properties, optionset);
|
|
+ // CraftBukkit end
|
|
String string = this.get("level-seed", "");
|
|
boolean flag = this.get("generate-structures", true);
|
|
long l = WorldOptions.parseSeed(string).orElse(WorldOptions.randomSeed());
|
|
@@ -126,15 +_,21 @@
|
|
this.get("initial-enabled-packs", String.join(",", WorldDataConfiguration.DEFAULT.dataPacks().getEnabled())),
|
|
this.get("initial-disabled-packs", String.join(",", WorldDataConfiguration.DEFAULT.dataPacks().getDisabled()))
|
|
);
|
|
+ // Paper start - Configurable rcon ip
|
|
+ final String rconIp = this.getStringRaw("rcon.ip");
|
|
+ this.rconIp = rconIp == null ? this.serverIp : rconIp;
|
|
+ // Paper end - Configurable rcon ip
|
|
}
|
|
|
|
- public static DedicatedServerProperties fromFile(Path path) {
|
|
- return new DedicatedServerProperties(loadFromFile(path));
|
|
+ // CraftBukkit start
|
|
+ public static DedicatedServerProperties fromFile(Path path, joptsimple.OptionSet optionset) {
|
|
+ return new DedicatedServerProperties(loadFromFile(path), optionset);
|
|
}
|
|
|
|
@Override
|
|
- protected DedicatedServerProperties reload(RegistryAccess registryAccess, Properties properties) {
|
|
- return new DedicatedServerProperties(properties);
|
|
+ public DedicatedServerProperties reload(RegistryAccess registryAccess, Properties properties, joptsimple.OptionSet options) {
|
|
+ return new DedicatedServerProperties(properties, options);
|
|
+ // CraftBukkit end
|
|
}
|
|
|
|
@Nullable
|