mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 11:44:19 +01:00
b3a8254758
By: md_5 <git@md-5.net>
50 lines
2.5 KiB
Diff
50 lines
2.5 KiB
Diff
--- a/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
|
+++ b/net/minecraft/server/dedicated/DedicatedServerProperties.java
|
|
@@ -10,8 +10,14 @@
|
|
import net.minecraft.world.level.EnumGamemode;
|
|
import net.minecraft.world.level.levelgen.GeneratorSettings;
|
|
|
|
+// CraftBukkit start
|
|
+import joptsimple.OptionSet;
|
|
+import net.minecraft.server.dedicated.PropertyManager.EditableProperty;
|
|
+// CraftBukkit end
|
|
+
|
|
public class DedicatedServerProperties extends PropertyManager<DedicatedServerProperties> {
|
|
|
|
+ public final boolean debug = this.getBoolean("debug", false); // CraftBukkit
|
|
public final boolean onlineMode = this.getBoolean("online-mode", true);
|
|
public final boolean preventProxyConnections = this.getBoolean("prevent-proxy-connections", false);
|
|
public final String serverIp = this.getString("server-ip", "");
|
|
@@ -64,8 +70,10 @@
|
|
@Nullable
|
|
public GeneratorSettings worldGenSettings;
|
|
|
|
- public DedicatedServerProperties(Properties properties) {
|
|
- super(properties);
|
|
+ // CraftBukkit start
|
|
+ public DedicatedServerProperties(Properties properties, OptionSet optionset) {
|
|
+ super(properties, optionset);
|
|
+ // CraftBukkit end
|
|
this.difficulty = (EnumDifficulty) this.a("difficulty", a(EnumDifficulty::getById, EnumDifficulty::a), EnumDifficulty::c, EnumDifficulty.EASY);
|
|
this.gamemode = (EnumGamemode) this.a("gamemode", a(EnumGamemode::getById, EnumGamemode::a), EnumGamemode::b, EnumGamemode.SURVIVAL);
|
|
this.levelName = this.getString("level-name", "world");
|
|
@@ -112,13 +120,15 @@
|
|
this.whiteList = this.b("white-list", false);
|
|
}
|
|
|
|
- public static DedicatedServerProperties load(Path path) {
|
|
- return new DedicatedServerProperties(loadPropertiesFile(path));
|
|
+ // CraftBukkit start
|
|
+ public static DedicatedServerProperties load(Path path, OptionSet optionset) {
|
|
+ return new DedicatedServerProperties(loadPropertiesFile(path), optionset);
|
|
}
|
|
|
|
@Override
|
|
- protected DedicatedServerProperties reload(IRegistryCustom iregistrycustom, Properties properties) {
|
|
- DedicatedServerProperties dedicatedserverproperties = new DedicatedServerProperties(properties);
|
|
+ protected DedicatedServerProperties reload(IRegistryCustom iregistrycustom, Properties properties, OptionSet optionset) {
|
|
+ DedicatedServerProperties dedicatedserverproperties = new DedicatedServerProperties(properties, optionset);
|
|
+ // CraftBukkit end
|
|
|
|
dedicatedserverproperties.a(iregistrycustom);
|
|
return dedicatedserverproperties;
|