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) unload(); //ensure nothing is left running (from a failed load or something)
//load addons //load addons
Path addonsFolder = serverInterface.getConfigFolder().resolve("addons"); Path packsFolder = serverInterface.getConfigFolder().resolve("packs");
Files.createDirectories(addonsFolder); Files.createDirectories(packsFolder);
Addons.tryLoadAddons(addonsFolder, true); Addons.tryLoadAddons(packsFolder);
//serverInterface.getModsFolder().ifPresent(Addons::tryLoadAddons);
//load configs //load configs
BlueMapConfigManager configManager = BlueMapConfigManager.builder() BlueMapConfigManager configManager = BlueMapConfigManager.builder()
.minecraftVersion(serverInterface.getMinecraftVersion()) .minecraftVersion(serverInterface.getMinecraftVersion())
.configRoot(serverInterface.getConfigFolder()) .configRoot(serverInterface.getConfigFolder())
.packsFolder(serverInterface.getConfigFolder().resolve("packs")) .packsFolder(packsFolder)
.modsFolder(serverInterface.getModsFolder().orElse(null)) .modsFolder(serverInterface.getModsFolder().orElse(null))
.useMetricsConfig(serverInterface.isMetricsEnabled() == Tristate.UNDEFINED) .useMetricsConfig(serverInterface.isMetricsEnabled() == Tristate.UNDEFINED)
.autoConfigWorlds(serverInterface.getLoadedServerWorlds()) .autoConfigWorlds(serverInterface.getLoadedServerWorlds())

View File

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