diff options
2 files changed, 8 insertions, 1 deletions
diff --git a/spark-bukkit/src/main/java/me/lucko/spark/bukkit/BukkitServerConfigProvider.java b/spark-bukkit/src/main/java/me/lucko/spark/bukkit/BukkitServerConfigProvider.java index 831150f..953e171 100644 --- a/spark-bukkit/src/main/java/me/lucko/spark/bukkit/BukkitServerConfigProvider.java +++ b/spark-bukkit/src/main/java/me/lucko/spark/bukkit/BukkitServerConfigProvider.java @@ -112,6 +112,7 @@ public class BukkitServerConfigProvider extends AbstractServerConfigProvider<Buk .add("rcon<dot>password") .add("level-seed") .add("world-settings.*.feature-seeds") + .add("world-settings.*.seed-*") .addAll(getTimingsHiddenConfigs()) .addAll(getSystemPropertyList("spark.serverconfigs.hiddenpaths")); 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 56b3731..ead2131 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 @@ -108,6 +108,12 @@ public abstract class AbstractServerConfigProvider<T extends Enum<T>> implements keys = jsonObject.entrySet().stream() .map(Map.Entry::getKey) .collect(Collectors.toList()); + } else if (expected.endsWith("*")) { + String pattern = expected.substring(0, expected.length() - 1); + keys = jsonObject.entrySet().stream() + .map(Map.Entry::getKey) + .filter(key -> key.startsWith(pattern)) + .collect(Collectors.toList()); } else if (jsonObject.has(expected)) { keys = Collections.singletonList(expected); } else { @@ -118,7 +124,7 @@ public abstract class AbstractServerConfigProvider<T extends Enum<T>> implements if (path.isEmpty()) { jsonObject.remove(key); } else { - Deque<String> pathCopy = expected.equals("*") + Deque<String> pathCopy = keys.size() > 1 ? new LinkedList<>(path) : path; |