Merge addons folder into packs folder, addons now go into packs

This commit is contained in:
Lukas Rieger (Blue) 2024-11-03 11:50:59 +01:00
parent 8d04785e3a
commit de5f1baca5
No known key found for this signature in database
GPG Key ID: AA33883B1BBA03E6
2 changed files with 8 additions and 8 deletions

View File

@ -122,16 +122,15 @@ private void load(@Nullable ResourcePack preloadedResourcePack) throws IOExcepti
unload(); //ensure nothing is left running (from a failed load or something)
//load addons
Path addonsFolder = serverInterface.getConfigFolder().resolve("addons");
Files.createDirectories(addonsFolder);
Addons.tryLoadAddons(addonsFolder, true);
//serverInterface.getModsFolder().ifPresent(Addons::tryLoadAddons);
Path packsFolder = serverInterface.getConfigFolder().resolve("packs");
Files.createDirectories(packsFolder);
Addons.tryLoadAddons(packsFolder);
//load configs
BlueMapConfigManager configManager = BlueMapConfigManager.builder()
.minecraftVersion(serverInterface.getMinecraftVersion())
.configRoot(serverInterface.getConfigFolder())
.packsFolder(serverInterface.getConfigFolder().resolve("packs"))
.packsFolder(packsFolder)
.modsFolder(serverInterface.getModsFolder().orElse(null))
.useMetricsConfig(serverInterface.isMetricsEnabled() == Tristate.UNDEFINED)
.autoConfigWorlds(serverInterface.getLoadedServerWorlds())

View File

@ -333,15 +333,16 @@ public static void main(String[] args) {
}
// load addons
Path addonsFolder = cli.configFolder.resolve("addons");
Files.createDirectories(addonsFolder);
Addons.tryLoadAddons(cli.configFolder.resolve("addons"), true);
Path packsFolder = cli.configFolder.resolve("packs");
Files.createDirectories(packsFolder);
Addons.tryLoadAddons(packsFolder);
// load configs
BlueMapConfigManager configs = BlueMapConfigManager.builder()
.minecraftVersion(cli.minecraftVersion)
.configRoot(cli.configFolder)
.modsFolder(cli.modsFolder)
.packsFolder(packsFolder)
.usePluginConfig(false)
.defaultDataFolder(Path.of("data"))
.defaultWebroot(Path.of("web"))