3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-24 15:20:11 +01:00
Paper/nms-patches/DedicatedServerProperties.patch

47 Zeilen
2.6 KiB
Diff

2019-04-23 04:00:00 +02:00
--- a/net/minecraft/server/DedicatedServerProperties.java
+++ b/net/minecraft/server/DedicatedServerProperties.java
@@ -2,9 +2,11 @@
import java.util.Properties;
import java.util.concurrent.TimeUnit;
+import joptsimple.OptionSet; // CraftBukkit
public class DedicatedServerProperties extends PropertyManager<DedicatedServerProperties> {
+ public final boolean debug = this.getBoolean("debug", false); // CraftBukkit
public final boolean onlineMode = this.getBoolean("online-mode", true);
public final boolean preventProxyConnections = this.getBoolean("prevent-proxy-connections", false);
public final String serverIp = this.getString("server-ip", "");
2020-08-11 23:00:00 +02:00
@@ -54,8 +56,10 @@
2019-04-23 04:00:00 +02:00
public final PropertyManager<DedicatedServerProperties>.EditableProperty<Boolean> whiteList;
2020-06-25 02:00:00 +02:00
public final GeneratorSettings generatorSettings;
2019-04-23 04:00:00 +02:00
2020-08-11 23:00:00 +02:00
- public DedicatedServerProperties(Properties properties, IRegistryCustom iregistrycustom) {
2019-04-23 04:00:00 +02:00
- super(properties);
+ // CraftBukkit start
2020-08-11 23:00:00 +02:00
+ public DedicatedServerProperties(Properties properties, IRegistryCustom iregistrycustom, OptionSet optionset) {
2019-04-23 04:00:00 +02:00
+ super(properties, optionset);
+ // CraftBukkit end
this.difficulty = (EnumDifficulty) this.a("difficulty", a(EnumDifficulty::getById, EnumDifficulty::a), EnumDifficulty::c, EnumDifficulty.EASY);
this.gamemode = (EnumGamemode) this.a("gamemode", a(EnumGamemode::getById, EnumGamemode::a), EnumGamemode::b, EnumGamemode.SURVIVAL);
this.levelName = this.getString("level-name", "world");
2020-08-11 23:00:00 +02:00
@@ -105,12 +109,14 @@
this.generatorSettings = GeneratorSettings.a(iregistrycustom, properties);
2019-04-23 04:00:00 +02:00
}
2020-08-11 23:00:00 +02:00
- public static DedicatedServerProperties load(IRegistryCustom iregistrycustom, java.nio.file.Path java_nio_file_path) {
- return new DedicatedServerProperties(loadPropertiesFile(java_nio_file_path), iregistrycustom);
2019-04-23 04:00:00 +02:00
+ // CraftBukkit start
2020-08-11 23:00:00 +02:00
+ public static DedicatedServerProperties load(IRegistryCustom iregistrycustom, java.nio.file.Path java_nio_file_path, OptionSet optionset) {
+ return new DedicatedServerProperties(loadPropertiesFile(java_nio_file_path), iregistrycustom, optionset);
2019-04-23 04:00:00 +02:00
}
@Override
2020-08-11 23:00:00 +02:00
- protected DedicatedServerProperties reload(IRegistryCustom iregistrycustom, Properties properties) {
- return new DedicatedServerProperties(properties, iregistrycustom);
+ protected DedicatedServerProperties reload(IRegistryCustom iregistrycustom, Properties properties, OptionSet optionset) {
+ return new DedicatedServerProperties(properties, iregistrycustom, optionset);
2019-04-23 04:00:00 +02:00
+ // CraftBukkit end
}
}