Skip to content

Commit

Permalink
7.3.11
Browse files Browse the repository at this point in the history
- FIX: .install mod not renaming NEW_MOD to actual name
- FIX: .install mod throwing error and causing endless task loop
  • Loading branch information
Osiris-Team committed Oct 19, 2023
1 parent c08db6f commit 0482f66
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<groupId>com.osiris.autoplug.client</groupId>
<artifactId>autoplug-client</artifactId>
<version>7.3.10</version>
<version>7.3.11</version>
<packaging>jar</packaging>

<name>AutoPlug-Client</name>
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/com/osiris/autoplug/client/console/Commands.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<MinecraftPlugin> plugins = new UtilsMinecraft().getPlugins(modsDir);
for (MinecraftPlugin pl : plugins) {
if (pl.getInstallationPath().equals(finalDest.getAbsolutePath())) {
List<MinecraftMod> 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);
Expand Down

0 comments on commit 0482f66

Please sign in to comment.