mirror of
https://github.com/darverdevs/PluginInstaller.git
synced 2024-11-21 17:06:03 -08:00
bug fixes
This commit is contained in:
parent
214734c519
commit
aa0407ae2e
Binary file not shown.
|
@ -35,14 +35,14 @@ public class InstallCommand implements CommandExecutor {
|
|||
try (InputStream in = plugin.openStream()) {
|
||||
|
||||
// Installs the plugin
|
||||
ins.InstallPlugin(in, Install_Jar.toLowerCase(), snder);
|
||||
ins.InstallPlugin(in, Install_Jar.toLowerCase());
|
||||
snder.sendMessage("You have successfully installed the " + ChatColor.GREEN + Install_Jar.toUpperCase() + ChatColor.WHITE + " plugin!");
|
||||
return true;
|
||||
} catch (IOException e) {}
|
||||
} else if (Install_Jar.equalsIgnoreCase("recommended")) {
|
||||
InputStream reco1 = URI.create("https://github.com/darverdevs/PluginInstallerRepo/raw/main/dupepatch.jar")
|
||||
.toURL().openStream();
|
||||
ins.InstallPlugin(reco1, "DupePatch", snder);
|
||||
ins.InstallPlugin(reco1, "DupePatch");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
snder.sendMessage("\"" + Install_Jar + "\"" + "is not a valid plugin from the database");
|
||||
|
|
|
@ -16,7 +16,7 @@ import java.util.HashMap;
|
|||
|
||||
public class Installer {
|
||||
|
||||
public void InstallPlugin(InputStream in, String pluginName, CommandSender s) throws IOException {
|
||||
public void InstallPlugin(InputStream in, String pluginName) throws IOException {
|
||||
File f = new File(Main.getInstance().getDataFolder().getParent() + "/" + pluginName + ".jar");
|
||||
Files.copy(in, f.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||
}
|
||||
|
@ -38,8 +38,11 @@ public class Installer {
|
|||
InputStream in = URI.create("https://github.com/darverdevs/EaglerPluginUpdater/raw/main/out/artifacts/EaglerPluginUpdater_jar/EaglerPluginUpdater.jar")
|
||||
.toURL().openStream();
|
||||
System.out.println("Check 3 passed");
|
||||
Files.copy(in, file.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||
} catch (IOException e) {}
|
||||
Installer ins = new Installer();
|
||||
ins.InstallPlugin(in, "EaglerPluginUpdater");
|
||||
} catch (IOException e) {
|
||||
System.out.println("Invalid Link");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user