fix: fix a bug in remove config
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/me/earthme/luminol/config/LuminolConfig.java
|
||||
@@ -1,0 +_,379 @@
|
||||
@@ -1,0 +_,382 @@
|
||||
+package me.earthme.luminol.config;
|
||||
+
|
||||
+import com.electronwill.nightconfig.core.UnmodifiableConfig;
|
||||
@@ -167,7 +167,10 @@
|
||||
+ if (!removed && configFileInstance.get(fullConfigKeyName) != null) break;
|
||||
+ }
|
||||
+ }
|
||||
+ if (removed) continue;
|
||||
+ if (removed) {
|
||||
+ removeConfig(fullConfigKeyName.split("\\."));
|
||||
+ continue;
|
||||
+ }
|
||||
+ if (configFileInstance.get(fullConfigKeyName) != null) continue;
|
||||
+ if (currentValue == null) {
|
||||
+ throw new UnsupportedOperationException("Config " + singleConfigModule.getBaseName() + "tried to add an null default value!");
|
||||
|
||||
Reference in New Issue
Block a user