craftbukkit/nms-patches/DedicatedServerSettings.patch

28 lines
1 KiB
Diff
Raw Normal View History

2019-04-23 12:00:00 +10:00
--- a/net/minecraft/server/DedicatedServerSettings.java
+++ b/net/minecraft/server/DedicatedServerSettings.java
2021-03-09 08:47:33 +11:00
@@ -2,14 +2,21 @@
2019-04-23 12:00:00 +10:00
import java.util.function.UnaryOperator;
2021-03-09 08:47:33 +11:00
2019-04-23 12:00:00 +10:00
+// CraftBukkit start
+import java.io.File;
+import joptsimple.OptionSet;
+// CraftBukkit end
2021-03-09 08:47:33 +11:00
+
2019-04-23 12:00:00 +10:00
public class DedicatedServerSettings {
private final java.nio.file.Path path;
private DedicatedServerProperties properties;
2020-08-12 07:00:00 +10:00
- public DedicatedServerSettings(IRegistryCustom iregistrycustom, java.nio.file.Path java_nio_file_path) {
2019-04-23 12:00:00 +10:00
- this.path = java_nio_file_path;
2020-08-12 07:00:00 +10:00
- this.properties = DedicatedServerProperties.load(iregistrycustom, java_nio_file_path);
2019-04-23 12:00:00 +10:00
+ // CraftBukkit start
2020-08-12 07:00:00 +10:00
+ public DedicatedServerSettings(IRegistryCustom iregistrycustom, OptionSet optionset) {
2019-04-23 12:00:00 +10:00
+ this.path = ((File) optionset.valueOf("config")).toPath();
2020-08-12 07:00:00 +10:00
+ this.properties = DedicatedServerProperties.load(iregistrycustom, path, optionset);
2019-04-23 12:00:00 +10:00
+ // CraftBukkit end
}
public DedicatedServerProperties getProperties() {