recompile

This commit is contained in:
Fangoboyo 2022-06-08 16:42:30 -07:00
parent 6fff926ba2
commit 8bca5c05e4
3 changed files with 5 additions and 2 deletions

View File

@ -8,6 +8,8 @@ import java.nio.file.Files;
import java.nio.file.StandardCopyOption; import java.nio.file.StandardCopyOption;
import static org.bukkit.Bukkit.getServer; import static org.bukkit.Bukkit.getServer;
import org.bukkit.plugin.Plugin;
import tech.nully.PluginInstaller.Main; import tech.nully.PluginInstaller.Main;
public class Updater { public class Updater {
@ -16,7 +18,8 @@ public class Updater {
.toURL().openStream(); .toURL().openStream();
File f = new File(Main.getInstance().getDataFolder().getParent() + "/EaglerPluginInstaller.jar"); File f = new File(Main.getInstance().getDataFolder().getParent() + "/EaglerPluginInstaller.jar");
Files.copy(in, f.toPath(), StandardCopyOption.REPLACE_EXISTING); Files.copy(in, f.toPath(), StandardCopyOption.REPLACE_EXISTING);
getServer().getPluginManager().disablePlugin(Main.getInstance()); Plugin instance = Main.getInstance();
getServer().getPluginManager().enablePlugin(Main.getInstance()); getServer().getPluginManager().disablePlugin(instance);
getServer().getPluginManager().enablePlugin(instance);
} }
} }