diff options
author | Luck <git@lucko.me> | 2022-05-05 21:04:23 +0100 |
---|---|---|
committer | Luck <git@lucko.me> | 2022-05-05 21:04:23 +0100 |
commit | c1bf08cd76f4ddee97a530f9ab4ffa613b6f27f1 (patch) | |
tree | 447a3b5d8c62006ecdb65043e7198f8213f17bc4 /spark-common/src/main/java/me/lucko | |
parent | b077100667c1dee6e73da399e3484f92bbf67cb8 (diff) | |
download | spark-c1bf08cd76f4ddee97a530f9ab4ffa613b6f27f1.tar.gz spark-c1bf08cd76f4ddee97a530f9ab4ffa613b6f27f1.tar.bz2 spark-c1bf08cd76f4ddee97a530f9ab4ffa613b6f27f1.zip |
Exclude feature-seeds from config (#189)
Diffstat (limited to 'spark-common/src/main/java/me/lucko')
-rw-r--r-- | spark-common/src/main/java/me/lucko/spark/common/platform/serverconfig/AbstractServerConfigProvider.java | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/spark-common/src/main/java/me/lucko/spark/common/platform/serverconfig/AbstractServerConfigProvider.java b/spark-common/src/main/java/me/lucko/spark/common/platform/serverconfig/AbstractServerConfigProvider.java index 7e04400..d09eb7c 100644 --- a/spark-common/src/main/java/me/lucko/spark/common/platform/serverconfig/AbstractServerConfigProvider.java +++ b/spark-common/src/main/java/me/lucko/spark/common/platform/serverconfig/AbstractServerConfigProvider.java @@ -101,14 +101,12 @@ public abstract class AbstractServerConfigProvider<T extends Enum<T>> implements JsonObject jsonObject = json.getAsJsonObject(); String member = path.removeFirst().replace("<dot>", "."); - if (!jsonObject.has(member)) { - return; - } - - if (path.isEmpty()) { - jsonObject.remove(member); - } else { - delete(jsonObject.get(member), path); + if (member.equals("*") || jsonObject.has(member)) { + if (path.isEmpty()) { + jsonObject.remove(member); + } else { + delete(jsonObject.get(member), path); + } } } |