mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-19 15:09:25 +00:00
Use correct way to resolve all world config path
Fixes https://github.com/Winds-Studio/Leaf/issues/342 supersedes https://github.com/Winds-Studio/Leaf/pull/344
This commit is contained in:
@@ -227,8 +227,12 @@ public class LeafConfig {
|
|||||||
extraConfigs.addAll(Arrays.asList(existing.split(",")));
|
extraConfigs.addAll(Arrays.asList(existing.split(",")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Use same way in spark's BukkitServerConfigProvider#getNestedFiles to get all world configs
|
||||||
|
// It may spam in the spark profiler, but it's ok, since spark uses YamlConfigParser.INSTANCE to
|
||||||
|
// get configs defined in extra config flag instead of using SplitYamlConfigParser.INSTANCE
|
||||||
for (World world : Bukkit.getWorlds()) {
|
for (World world : Bukkit.getWorlds()) {
|
||||||
extraConfigs.add(world.getWorldFolder().getName() + "/gale-world.yml"); // Gale world config
|
Path galeWorldFolder = world.getWorldFolder().toPath().resolve("gale-world.yml");
|
||||||
|
extraConfigs.add(galeWorldFolder.toString().replace("\\", "/").replace("./", "")); // Gale world config
|
||||||
}
|
}
|
||||||
|
|
||||||
return extraConfigs;
|
return extraConfigs;
|
||||||
|
|||||||
Reference in New Issue
Block a user