craftbukkit/nms-patches/net/minecraft/server/dedicated/DedicatedServerSettings.patch

28 lines
1,022 B
Diff
Raw Normal View History

2021-03-16 09:00:00 +11:00
--- a/net/minecraft/server/dedicated/DedicatedServerSettings.java
+++ b/net/minecraft/server/dedicated/DedicatedServerSettings.java
@@ -4,14 +4,21 @@
2019-04-23 12:00:00 +10:00
import java.util.function.UnaryOperator;
2021-03-16 09:00:00 +11:00
import net.minecraft.core.IRegistryCustom;
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 {
2021-03-16 09:00:00 +11:00
private final Path path;
2019-04-23 12:00:00 +10:00
private DedicatedServerProperties properties;
2021-03-16 09:00:00 +11:00
- public DedicatedServerSettings(IRegistryCustom iregistrycustom, Path path) {
- this.path = path;
- this.properties = DedicatedServerProperties.load(iregistrycustom, 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() {