UpdateChecker

A utility class to assist in checking for updates for plugins uploaded to SpigotMC. Before any members of this class are accessed, init must be invoked by the plugin, preferrably in its onEnable method, though that is not a requirement.

This class performs asynchronous queries to SpiGet, an REST server which is updated periodically. If the results of requestUpdateCheck are inconsistent with what is published on SpigotMC, it may be due to SpiGet's cache. Results will be updated in due time.

Author

Parker Hawke - 2008Choco

Types

Link copied to clipboard
A constant reason for the result of UpdateResult.
Link copied to clipboard
Represents a result for an update query performed by requestUpdateCheck.
Link copied to clipboard
A functional interface to compare two version Strings with similar version schemes.

Functions

Link copied to clipboard
open fun get(): UpdateChecker
Get the initialized instance of UpdateChecker.
Link copied to clipboard
open fun init(plugin: JavaPlugin, pluginID: Int): UpdateChecker
open fun init(plugin: JavaPlugin, pluginID: Int, versionScheme: UpdateChecker.VersionScheme): UpdateChecker
Initialize this update checker with the specified values and return its instance.
Link copied to clipboard
Check whether the UpdateChecker has been initialized or not (if init has been invoked) and get is safe to use.
Link copied to clipboard
Request an update check to SpiGet.
Link copied to clipboard
open fun runCheck(guilds: Guilds, settingsManager: SettingsManager)
Run the update check for the plugin
Link copied to clipboard
open fun toInt(str: String, defaultValue: Int): Int

Properties