diff --git a/src/main/java/us/mytheria/bloblib/utilities/ResourceUtil.java b/src/main/java/us/mytheria/bloblib/utilities/ResourceUtil.java index 3b7d6de..6d20781 100644 --- a/src/main/java/us/mytheria/bloblib/utilities/ResourceUtil.java +++ b/src/main/java/us/mytheria/bloblib/utilities/ResourceUtil.java @@ -64,17 +64,16 @@ public static void writeNewValues(File existingFile, YamlConfiguration updateYam // if the parent is not a section, it means server admin has changed the file if (!existingYamlConfig.isConfigurationSection(parent)) return; - existingYamlConfig.set(key, updateYamlConfiguration.get(key)); + existingYamlConfig.set(key, updateYamlConfiguration.get(key)); // write } if (existingYamlConfig.contains(key)) { existing.add(key); return; //if it exists, skip } String parent = getParent(key); - List match = existing.stream() - .filter(s -> s.startsWith(parent)) - .toList(); - if (!match.isEmpty()) return; // if the parent exists, skip + // if the parent is not a section, it means server admin has changed the file + if (!existingYamlConfig.isConfigurationSection(parent)) + return; existingYamlConfig.set(key, updateYamlConfiguration.get(key)); // write }); try {