PaperMC/paper-server/nms-patches/net/minecraft/server/dedicated/DedicatedServerSettings.patch

28 lines
1,022 B
Diff
Raw Normal View History

2021-03-15 23:00:00 +01:00
--- a/net/minecraft/server/dedicated/DedicatedServerSettings.java
+++ b/net/minecraft/server/dedicated/DedicatedServerSettings.java
@@ -4,14 +4,21 @@
import java.util.function.UnaryOperator;
2021-03-15 23:00:00 +01:00
import net.minecraft.core.IRegistryCustom;
+// CraftBukkit start
+import java.io.File;
+import joptsimple.OptionSet;
+// CraftBukkit end
+
public class DedicatedServerSettings {
2021-03-15 23:00:00 +01:00
private final Path path;
private DedicatedServerProperties properties;
2021-03-15 23:00:00 +01:00
- public DedicatedServerSettings(IRegistryCustom iregistrycustom, Path path) {
- this.path = path;
- this.properties = DedicatedServerProperties.load(iregistrycustom, path);
+ // CraftBukkit start
+ public DedicatedServerSettings(IRegistryCustom iregistrycustom, OptionSet optionset) {
+ this.path = ((File) optionset.valueOf("config")).toPath();
+ this.properties = DedicatedServerProperties.load(iregistrycustom, path, optionset);
+ // CraftBukkit end
}
public DedicatedServerProperties getProperties() {