Package net.lapismc.lapiscore.utils
Class SpigotUpdateChecker
- java.lang.Object
-
- net.lapismc.lapiscore.utils.SpigotUpdateChecker
-
public class SpigotUpdateChecker extends java.lang.ObjectClass used to check for updates on Spigot resources Useful for closed source/premium plugins
-
-
Constructor Summary
Constructors Constructor Description SpigotUpdateChecker(LapisCorePlugin plugin, java.lang.String resourceID)Setup the Update Checker
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetNewVersion()Get the string for the latest version, this could be used when informing the user about an update to show how far behind they arebooleanisUpdateAvailable()Check if there is an update available on Spigot
-
-
-
Constructor Detail
-
SpigotUpdateChecker
public SpigotUpdateChecker(LapisCorePlugin plugin, java.lang.String resourceID)
Setup the Update Checker- Parameters:
plugin- The plugin that you wish to report toresourceID- The Spigot resource ID e.g. LapisBans = 58896
-
-
Method Detail
-
isUpdateAvailable
public boolean isUpdateAvailable()
Check if there is an update available on Spigot- Returns:
- Returns true if there is a different version as the latest on spigot, false if the versions match
-
getNewVersion
public java.lang.String getNewVersion()
Get the string for the latest version, this could be used when informing the user about an update to show how far behind they are- Returns:
- Returns the latest version on spigot
-
-