mirror of
https://github.com/darverdevs/PluginInstaller.git
synced 2024-11-22 01:06:06 -08:00
Tried to fix an IOException
This commit is contained in:
parent
0369a72916
commit
214734c519
Binary file not shown.
|
@ -31,11 +31,15 @@ public class Installer {
|
||||||
|
|
||||||
public static void InstallUpdater() throws IOException {
|
public static void InstallUpdater() throws IOException {
|
||||||
File file = new File(Main.getInstance().getDataFolder().getParent() + "/EaglerPluginUpdater.jar");
|
File file = new File(Main.getInstance().getDataFolder().getParent() + "/EaglerPluginUpdater.jar");
|
||||||
|
System.out.println("Check 1 passed");
|
||||||
if (!(file.exists())) {
|
if (!(file.exists())) {
|
||||||
URL plugin = URI.create("https://github.com/darverdevs/EaglerPluginUpdater/raw/main/out/artifacts/EaglerPluginUpdater_jar/EaglerPluginUpdater.jar")
|
System.out.println("Check 2 passed");
|
||||||
.toURL();
|
try {
|
||||||
InputStream in = plugin.openStream();
|
InputStream in = URI.create("https://github.com/darverdevs/EaglerPluginUpdater/raw/main/out/artifacts/EaglerPluginUpdater_jar/EaglerPluginUpdater.jar")
|
||||||
Files.copy(in, file.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
.toURL().openStream();
|
||||||
|
System.out.println("Check 3 passed");
|
||||||
|
Files.copy(in, file.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||||
|
} catch (IOException e) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user