bump the default maxMobSpawns default to 250, and add support for unlimited

Use -1 to represent vanilla/unlimited.
Updated PaperWorldConfig to also update the individual worlds limit if it was set
to the new default value.

Should hopefully help #235
This commit is contained in:
Aikar
2016-05-16 22:07:12 -04:00
parent 478f246490
commit 4bead5b898
3 changed files with 16 additions and 5 deletions

View File

@@ -66,8 +66,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
+ commands = new HashMap<String, Command>();
+
+ version = getInt("config-version", 9);
+ set("config-version", 9);
+ version = getInt("config-version", 10);
+ set("config-version", 10);
+ readConfig(PaperConfig.class, null);
+ }
+
@@ -217,6 +217,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
+ private void set(String path, Object val) {
+ config.set("world-settings.default." + path, val);
+ if (config.get("world-settings." + worldName + "." + path) != null) {
+ config.set("world-settings." + worldName + "." + path, val);
+ }
+ }
+
+ private boolean getBoolean(String path, boolean def) {