Fix treasure maps discovered settings (#7627)

This commit is contained in:
Jake Potrebic 2022-06-05 17:17:27 -07:00 committed by GitHub
parent d8ef841114
commit 4b27254e6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
95 changed files with 223 additions and 195 deletions

View file

@ -201,10 +201,10 @@ index 0000000000000000000000000000000000000000..80a3d5890aab91e6a48d573414018785
+}
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
new file mode 100644
index 0000000000000000000000000000000000000000..1dc56bee6827f6552cfa93a92fe8d0b5f94ab596
index 0000000000000000000000000000000000000000..0853ff7641103447f458b2dc08076c27e3937074
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -0,0 +1,99 @@
@@ -0,0 +1,104 @@
+package com.destroystokyo.paper;
+
+import java.util.List;
@ -259,8 +259,13 @@ index 0000000000000000000000000000000000000000..1dc56bee6827f6552cfa93a92fe8d0b5
+ }
+
+ 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) {