Skip to content

Commit

Permalink
Merge addons folder into packs folder, addons now go into packs
Browse files Browse the repository at this point in the history
  • Loading branch information
TBlueF committed Nov 3, 2024
1 parent 8d04785 commit de5f1ba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down

0 comments on commit de5f1ba

Please sign in to comment.