diff --git a/implementations/cli/src/main/java/de/bluecolored/bluemap/cli/BlueMapCLI.java b/implementations/cli/src/main/java/de/bluecolored/bluemap/cli/BlueMapCLI.java index 8ea7d7b9..370fd22a 100644 --- a/implementations/cli/src/main/java/de/bluecolored/bluemap/cli/BlueMapCLI.java +++ b/implementations/cli/src/main/java/de/bluecolored/bluemap/cli/BlueMapCLI.java @@ -72,6 +72,7 @@ public class BlueMapCLI { private String minecraftVersion = null; private Path configFolder = Path.of("config"); + private Path modsFolder = null; public void renderMaps(BlueMapService blueMap, boolean watch, Predicate force, boolean forceGenerateWebapp, @@ -318,6 +319,14 @@ public static void main(String[] args) { FileHelper.createDirectories(cli.configFolder); } + //mods folder + if (cmd.hasOption("n")) { + cli.modsFolder = Path.of(cmd.getOptionValue("n")); + if (!Files.isDirectory(cli.modsFolder)) { + throw new ConfigurationException("Mods folder does not exist: " + cli.modsFolder); + } + } + //minecraft version if (cmd.hasOption("v")) { cli.minecraftVersion = cmd.getOptionValue("v"); @@ -332,6 +341,7 @@ public static void main(String[] args) { BlueMapConfigManager configs = BlueMapConfigManager.builder() .minecraftVersion(cli.minecraftVersion) .configRoot(cli.configFolder) + .modsFolder(cli.modsFolder) .usePluginConfig(false) .defaultDataFolder(Path.of("data")) .defaultWebroot(Path.of("web")) @@ -435,6 +445,15 @@ private static Options createOptions() { .build() ); + options.addOption( + Option.builder("n") + .longOpt("mods") + .hasArg() + .argName("mods-folder") + .desc("Sets path of the folder containing the mods that contain extra resources for rendering.") + .build() + ); + options.addOption( Option.builder("v") .longOpt("mc-version")