diff options
Diffstat (limited to 'patch-remap/mache-spigotflower-stripped/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch')
-rw-r--r-- | patch-remap/mache-spigotflower-stripped/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower-stripped/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch b/patch-remap/mache-spigotflower-stripped/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch new file mode 100644 index 0000000000..e4edcccb3e --- /dev/null +++ b/patch-remap/mache-spigotflower-stripped/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch @@ -0,0 +1,53 @@ +--- a/net/minecraft/server/dedicated/DedicatedServerProperties.java ++++ b/net/minecraft/server/dedicated/DedicatedServerProperties.java +@@ -44,11 +44,16 @@ + import net.minecraft.world.level.levelgen.presets.WorldPresets; + import org.slf4j.Logger; + ++// CraftBukkit start ++import joptsimple.OptionSet; ++// CraftBukkit end ++ + public class DedicatedServerProperties extends Settings<DedicatedServerProperties> { + + 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", ""); +@@ -103,8 +108,10 @@ + private final DedicatedServerProperties.WorldDimensionData worldDimensionData; + public final WorldOptions worldOptions; + +- public DedicatedServerProperties(Properties properties) { +- super(properties); ++ // CraftBukkit start ++ public DedicatedServerProperties(Properties properties, OptionSet optionset) { ++ super(properties, optionset); ++ // CraftBukkit end + this.difficulty = (Difficulty) this.get("difficulty", dispatchNumberOrString(Difficulty::byId, Difficulty::byName), Difficulty::getKey, Difficulty.EASY); + this.gamemode = (GameType) this.get("gamemode", dispatchNumberOrString(GameType::byId, GameType::byName), GameType::getName, GameType.SURVIVAL); + this.levelName = this.get("level-name", "world"); +@@ -161,14 +168,15 @@ + this.initialDataPackConfiguration = getDatapackConfig(this.get("initial-enabled-packs", String.join(",", WorldDataConfiguration.DEFAULT.dataPacks().getEnabled())), this.get("initial-disabled-packs", String.join(",", WorldDataConfiguration.DEFAULT.dataPacks().getDisabled()))); + } + +- public static DedicatedServerProperties fromFile(Path path) { +- return new DedicatedServerProperties(loadFromFile(path)); ++ // CraftBukkit start ++ public static DedicatedServerProperties fromFile(Path path, OptionSet optionset) { ++ return new DedicatedServerProperties(loadFromFile(path), optionset); + } + + @Override +- @Override +- protected DedicatedServerProperties reload(RegistryAccess registryaccess, Properties properties) { +- return new DedicatedServerProperties(properties); ++ protected DedicatedServerProperties reload(RegistryAccess iregistrycustom, Properties properties, OptionSet optionset) { ++ return new DedicatedServerProperties(properties, optionset); ++ // CraftBukkit end + } + + @Nullable |