From c1bf08cd76f4ddee97a530f9ab4ffa613b6f27f1 Mon Sep 17 00:00:00 2001 From: Luck Date: Thu, 5 May 2022 21:04:23 +0100 Subject: Exclude feature-seeds from config (#189) --- .../serverconfig/AbstractServerConfigProvider.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'spark-common/src/main/java/me/lucko') 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> implements JsonObject jsonObject = json.getAsJsonObject(); String member = path.removeFirst().replace("", "."); - 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); + } } } -- cgit