diff --git a/pom.xml b/pom.xml index 74cd037d..33433fa3 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.osiris.autoplug.client autoplug-client - 7.3.10 + 7.3.11 jar AutoPlug-Client diff --git a/src/main/java/com/osiris/autoplug/client/console/Commands.java b/src/main/java/com/osiris/autoplug/client/console/Commands.java index 64fb829f..26ddd1e9 100644 --- a/src/main/java/com/osiris/autoplug/client/console/Commands.java +++ b/src/main/java/com/osiris/autoplug/client/console/Commands.java @@ -401,17 +401,17 @@ public static boolean installMod(String command) throws Exception { return false; } MyBThreadManager myManager = new UtilsTasks().createManagerAndPrinter(); - File finalDest = new File(modsDir + "/" + result.plugin.getName() + "-LATEST-[" + result.latestVersion + "].jar"); - TaskModDownload task = new TaskModDownload("PluginDownloader", myManager.manager, tempName, result.latestVersion, - result.downloadUrl, result.plugin.getIgnoreContentType(), "AUTOMATIC", finalDest); + File finalDest = new File(modsDir + "/" + result.mod.getName() + "-LATEST-[" + result.latestVersion + "].jar"); + TaskModDownload task = new TaskModDownload("ModDownloader", myManager.manager, tempName, result.latestVersion, + result.downloadUrl, result.mod.ignoreContentType, "AUTOMATIC", finalDest); task.start(); new UtilsTasks().printResultsWhenDone(myManager.manager); - List plugins = new UtilsMinecraft().getPlugins(modsDir); - for (MinecraftPlugin pl : plugins) { - if (pl.getInstallationPath().equals(finalDest.getAbsolutePath())) { + List plugins = new UtilsMinecraft().getMods(modsDir); + for (MinecraftMod mod : plugins) { + if (mod.installationPath.equals(finalDest.getAbsolutePath())) { // Replace tempName with actual plugin name finalDest = new UtilsFile().renameFile(task.getFinalDest(), - new File(pl.getInstallationPath()).getName().replace(tempName, pl.getName())); + new File(mod.installationPath).getName().replace(tempName, mod.getName())); } } AL.info("Installed to: " + finalDest);