Package net.lapismc.lapiscore.utils
Class LapisUpdater
- java.lang.Object
-
- net.lapismc.lapiscore.utils.LapisUpdater
-
public class LapisUpdater extends java.lang.ObjectAn utility class to check and download plugin updates using GitHub
-
-
Constructor Summary
Constructors Constructor Description LapisUpdater(org.bukkit.plugin.java.JavaPlugin plugin, java.lang.String jarName, java.lang.String username, java.lang.String repoName, java.lang.String branch)The URL to the latest jar should be https://raw.githubusercontent.com/username/repoName/branch/updater/ID/jarName.jar
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckUpdate()Check if there is an updatevoiddownloadUpdate()Downloads the latest jar (if there is an update) and readies it for installation
-
-
-
Constructor Detail
-
LapisUpdater
public LapisUpdater(org.bukkit.plugin.java.JavaPlugin plugin, java.lang.String jarName, java.lang.String username, java.lang.String repoName, java.lang.String branch)The URL to the latest jar should be https://raw.githubusercontent.com/username/repoName/branch/updater/ID/jarName.jar- Parameters:
plugin- The main class of your pluginjarName- The name of the jar file, excludes .jarusername- The github username used for the reporepoName- The repo namebranch- The branch name
-
-