mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2026-01-06 15:51:31 +00:00
Fix config
This commit is contained in:
@@ -64,7 +64,7 @@ index 1141b3a88e2eb1baa705b4f781353df0305a7c85..b104a38d2c879b649a3862876c389564
|
||||
this.setFlightAllowed(dedicatedserverproperties.allowFlight);
|
||||
diff --git a/src/main/java/org/dreeam/leaf/LeafConfig.java b/src/main/java/org/dreeam/leaf/LeafConfig.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..511bc2175c4f25723bfdf59ae0ecb20e6fff1956
|
||||
index 0000000000000000000000000000000000000000..b3eef4b3619255f1f6084c2985b0fe242d25cc34
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/dreeam/leaf/LeafConfig.java
|
||||
@@ -0,0 +1,167 @@
|
||||
@@ -210,11 +210,11 @@ index 0000000000000000000000000000000000000000..511bc2175c4f25723bfdf59ae0ecb20e
|
||||
+ }
|
||||
+
|
||||
+ static Map<String, Object> getMap(String key, Map<String, Object> defaultValue) {
|
||||
+ if (defaultValue != null && config.getConfigurationSection(key) == null) {
|
||||
+ if (defaultValue != null && getConfigCopy().getConfigurationSection(key) == null) {
|
||||
+ config.addDefault(key, defaultValue);
|
||||
+ return defaultValue;
|
||||
+ }
|
||||
+ return toMap(convertToBukkit(config.getConfigurationSection(key)));
|
||||
+ return toMap(getConfigCopy().getConfigurationSection(key));
|
||||
+ }
|
||||
+
|
||||
+ private static Map<String, Object> toMap(ConfigurationSection section) {
|
||||
|
||||
Reference in New Issue
Block a user