46
paper-server/nms-patches/DedicatedServerProperties.patch
Normal file
46
paper-server/nms-patches/DedicatedServerProperties.patch
Normal file
@@ -0,0 +1,46 @@
|
||||
--- a/net/minecraft/server/DedicatedServerProperties.java
|
||||
+++ b/net/minecraft/server/DedicatedServerProperties.java
|
||||
@@ -2,9 +2,11 @@
|
||||
|
||||
import java.util.Properties;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
+import joptsimple.OptionSet; // CraftBukkit
|
||||
|
||||
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", "");
|
||||
@@ -51,8 +53,10 @@
|
||||
public final PropertyManager<DedicatedServerProperties>.EditableProperty<Integer> playerIdleTimeout;
|
||||
public final PropertyManager<DedicatedServerProperties>.EditableProperty<Boolean> whiteList;
|
||||
|
||||
- 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");
|
||||
@@ -96,12 +100,14 @@
|
||||
this.whiteList = this.b("white-list", false);
|
||||
}
|
||||
|
||||
- public static DedicatedServerProperties load(java.nio.file.Path java_nio_file_path) {
|
||||
- return new DedicatedServerProperties(loadPropertiesFile(java_nio_file_path));
|
||||
+ // CraftBukkit start
|
||||
+ public static DedicatedServerProperties load(java.nio.file.Path java_nio_file_path, OptionSet optionset) {
|
||||
+ return new DedicatedServerProperties(loadPropertiesFile(java_nio_file_path), optionset);
|
||||
}
|
||||
|
||||
@Override
|
||||
- protected DedicatedServerProperties reload(Properties properties) {
|
||||
- return new DedicatedServerProperties(properties);
|
||||
+ protected DedicatedServerProperties reload(Properties properties, OptionSet optionset) {
|
||||
+ return new DedicatedServerProperties(properties, optionset);
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user