--- a/net/minecraft/server/dedicated/DedicatedServerProperties.java +++ b/net/minecraft/server/dedicated/DedicatedServerProperties.java @@ -9,8 +9,14 @@ import net.minecraft.world.level.EnumGamemode; import net.minecraft.world.level.levelgen.GeneratorSettings; +// CraftBukkit start +import joptsimple.OptionSet; +import net.minecraft.server.dedicated.PropertyManager.EditableProperty; +// CraftBukkit end + public class DedicatedServerProperties extends PropertyManager { + 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", ""); @@ -61,8 +67,10 @@ public final PropertyManager.EditableProperty whiteList; public final GeneratorSettings generatorSettings; - public DedicatedServerProperties(Properties properties, IRegistryCustom iregistrycustom) { - super(properties); + // CraftBukkit start + public DedicatedServerProperties(Properties properties, IRegistryCustom iregistrycustom, OptionSet optionset) { + 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"); @@ -113,12 +121,14 @@ this.generatorSettings = GeneratorSettings.a(iregistrycustom, properties); } - public static DedicatedServerProperties load(IRegistryCustom iregistrycustom, Path path) { - return new DedicatedServerProperties(loadPropertiesFile(path), iregistrycustom); + // CraftBukkit start + public static DedicatedServerProperties load(IRegistryCustom iregistrycustom, Path path, OptionSet optionset) { + return new DedicatedServerProperties(loadPropertiesFile(path), iregistrycustom, optionset); } @Override - 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); + // CraftBukkit end } }