0
0
mirror of https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git synced 2024-11-22 05:26:17 +00:00
craftbukkit/nms-patches/net/minecraft/server/dedicated/DedicatedServerSettings.patch
2021-11-22 09:00:00 +11:00

28 lines
922 B
Diff

--- a/net/minecraft/server/dedicated/DedicatedServerSettings.java
+++ b/net/minecraft/server/dedicated/DedicatedServerSettings.java
@@ -3,14 +3,21 @@
import java.nio.file.Path;
import java.util.function.UnaryOperator;
+// CraftBukkit start
+import java.io.File;
+import joptsimple.OptionSet;
+// CraftBukkit end
+
public class DedicatedServerSettings {
private final Path source;
private DedicatedServerProperties properties;
- public DedicatedServerSettings(Path path) {
- this.source = path;
- this.properties = DedicatedServerProperties.fromFile(path);
+ // CraftBukkit start
+ public DedicatedServerSettings(OptionSet optionset) {
+ this.source = ((File) optionset.valueOf("config")).toPath();
+ this.properties = DedicatedServerProperties.fromFile(source, optionset);
+ // CraftBukkit end
}
public DedicatedServerProperties getProperties() {