@@ -11,11 +11,11 @@
|
||||
+
|
||||
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 @@
|
||||
+ public final boolean debug = this.get("debug", false); // CraftBukkit
|
||||
public final boolean onlineMode = this.get("online-mode", true);
|
||||
public final boolean preventProxyConnections = this.get("prevent-proxy-connections", false);
|
||||
public final String serverIp = this.get("server-ip", "");
|
||||
@@ -67,8 +73,10 @@
|
||||
@Nullable
|
||||
private GeneratorSettings worldGenSettings;
|
||||
|
||||
@@ -25,18 +25,18 @@
|
||||
+ 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");
|
||||
this.difficulty = (EnumDifficulty) this.get("difficulty", dispatchNumberOrString(EnumDifficulty::byId, EnumDifficulty::byName), EnumDifficulty::getKey, EnumDifficulty.EASY);
|
||||
this.gamemode = (EnumGamemode) this.get("gamemode", dispatchNumberOrString(EnumGamemode::byId, EnumGamemode::byName), EnumGamemode::getName, EnumGamemode.SURVIVAL);
|
||||
this.levelName = this.get("level-name", "world");
|
||||
@@ -112,13 +120,15 @@
|
||||
this.whiteList = this.b("white-list", false);
|
||||
this.whiteList = this.getMutable("white-list", false);
|
||||
}
|
||||
|
||||
- public static DedicatedServerProperties load(Path path) {
|
||||
- return new DedicatedServerProperties(loadPropertiesFile(path));
|
||||
- public static DedicatedServerProperties fromFile(Path path) {
|
||||
- return new DedicatedServerProperties(loadFromFile(path));
|
||||
+ // CraftBukkit start
|
||||
+ public static DedicatedServerProperties load(Path path, OptionSet optionset) {
|
||||
+ return new DedicatedServerProperties(loadPropertiesFile(path), optionset);
|
||||
+ public static DedicatedServerProperties fromFile(Path path, OptionSet optionset) {
|
||||
+ return new DedicatedServerProperties(loadFromFile(path), optionset);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -46,5 +46,5 @@
|
||||
+ DedicatedServerProperties dedicatedserverproperties = new DedicatedServerProperties(properties, optionset);
|
||||
+ // CraftBukkit end
|
||||
|
||||
dedicatedserverproperties.a(iregistrycustom);
|
||||
dedicatedserverproperties.getWorldGenSettings(iregistrycustom);
|
||||
return dedicatedserverproperties;
|
||||
|
||||
Reference in New Issue
Block a user