Fix treasure maps discovered settings (#7627)

This commit is contained in:
Jake Potrebic
2022-06-05 17:17:27 -07:00
parent 382529a546
commit 9b2964fe63
6 changed files with 43 additions and 15 deletions

View File

@@ -259,8 +259,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+
+ private boolean getBoolean(String path, boolean def) {
+ config.addDefault("world-settings.default." + path, def);
+ return config.getBoolean("world-settings." + worldName + "." + path, config.getBoolean("world-settings.default." + path));
+ return this.getBoolean(path, def, true);
+ }
+ private boolean getBoolean(String path, boolean def, boolean setDefault) {
+ if (setDefault) {
+ config.addDefault("world-settings.default." + path, def);
+ }
+ return config.getBoolean("world-settings." + worldName + "." + path, config.getBoolean("world-settings.default." + path, def));
+ }
+
+ private double getDouble(String path, double def) {