summaryrefslogtreecommitdiffstats
path: root/nms-patches/PropertyManager.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/PropertyManager.patch')
-rw-r--r--nms-patches/PropertyManager.patch36
1 files changed, 20 insertions, 16 deletions
diff --git a/nms-patches/PropertyManager.patch b/nms-patches/PropertyManager.patch
index 542cae57..e35d395b 100644
--- a/nms-patches/PropertyManager.patch
+++ b/nms-patches/PropertyManager.patch
@@ -1,6 +1,6 @@
---- ../work/decompile-8eb82bde//net/minecraft/server/PropertyManager.java 2014-11-28 17:43:43.345707429 +0000
-+++ src/main/java/net/minecraft/server/PropertyManager.java 2014-11-28 17:38:20.000000000 +0000
-@@ -8,6 +8,8 @@
+--- /home/matt/mc-dev-private//net/minecraft/server/PropertyManager.java 2015-02-26 22:40:23.035608135 +0000
++++ src/main/java/net/minecraft/server/PropertyManager.java 2015-02-26 22:40:23.039608134 +0000
+@@ -8,10 +8,12 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -9,12 +9,15 @@
public class PropertyManager {
private static final Logger a = LogManager.getLogger();
-@@ -39,8 +41,25 @@
- PropertyManager.a.warn(file + " does not exist");
- this.a();
- }
-+ }
-+
+- private final Properties properties = new Properties();
++ public final Properties properties = new Properties(); // CraftBukkit - public
+ private final File file;
+
+ public PropertyManager(File file) {
+@@ -42,6 +44,24 @@
+
+ }
+
+ // CraftBukkit start
+ private OptionSet options = null;
+
@@ -28,14 +31,15 @@
+ if ((this.options != null) && (this.options.has(name))) {
+ return (T) this.options.valueOf(name);
+ }
-
++
+ return value;
- }
++ }
+ // CraftBukkit end
-
++
public void a() {
PropertyManager.a.info("Generating new properties file");
-@@ -51,6 +70,12 @@
+ this.savePropertiesFile();
+@@ -51,6 +71,12 @@
FileOutputStream fileoutputstream = null;
try {
@@ -48,7 +52,7 @@
fileoutputstream = new FileOutputStream(this.file);
this.properties.store(fileoutputstream, "Minecraft server properties");
} catch (Exception exception) {
-@@ -80,36 +105,36 @@
+@@ -80,36 +106,36 @@
this.savePropertiesFile();
}
@@ -76,14 +80,14 @@
this.properties.setProperty(s, "" + i);
this.savePropertiesFile();
- return i;
-+ return getOverride(s ,i); // CraftBukkit
++ return getOverride(s, i); // CraftBukkit
}
}
public boolean getBoolean(String s, boolean flag) {
try {
- return Boolean.parseBoolean(this.getString(s, "" + flag));
-+ return getOverride(s, Boolean.parseBoolean(this.getString(s, "" + flag))); // CraftBukkit
++ return getOverride(s, Boolean.parseBoolean(this.getString(s, "" + flag))); //CraftBukkit
} catch (Exception exception) {
this.properties.setProperty(s, "" + flag);
this.savePropertiesFile();