public class Updater
extends java.lang.Object
Methods to look for in this class:
checkUpdate()
called in plugin.onEnable()
to display
update message in loggetCurrentVersion()
to get the version of the plugingetUpdateVersion()
to get the update versionupdateAvailable()
to check if theres an updateConstructor and Description |
---|
Updater(org.bukkit.plugin.Plugin plugin,
java.lang.String URL)
Creates a new instance of Updater.
|
Modifier and Type | Method and Description |
---|---|
void |
checkUpdate()
Logs and update message in console.
|
java.lang.String |
getCurrentVersion()
Gets the current plugin version from the plugin.yml.
|
java.lang.String |
getUpdateVersion()
Gets latest plugin version.
|
java.net.URL |
getUrl()
Gets the connected URL object.
|
boolean |
updateAvailable()
Checks to see if an update is available.
|
public Updater(org.bukkit.plugin.Plugin plugin, java.lang.String URL)
plugin.onEnable()
or called after the plugin is loaded. plugin
- Plugin to check updates forURL
- RSS feed URL link to check for updates on.public void checkUpdate()
updateAvailable()
public java.lang.String getUpdateVersion()
public boolean updateAvailable()
public java.net.URL getUrl()
public java.lang.String getCurrentVersion()