Package xyz.srnyx.annoyingapi
Class UpdateChecker
java.lang.Object
xyz.srnyx.annoyingapi.parents.AnnoyableClass
xyz.srnyx.annoyingapi.UpdateChecker
- All Implemented Interfaces:
Annoyable
Class for handling update checking
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal @Nullable UpdateChecker.LatestVersionThe latest version of the pluginFields inherited from class xyz.srnyx.annoyingapi.parents.AnnoyableClass
annoyingPlugin -
Constructor Summary
ConstructorsConstructorDescriptionUpdateChecker(@NotNull AnnoyingPlugin annoyingPlugin, @NotNull org.bukkit.plugin.PluginBase plugin, PluginPlatform.Multi platforms) Creates a newUpdateCheckerobjectUpdateChecker(@NotNull AnnoyingPlugin annoyingPlugin, @NotNull org.bukkit.plugin.PluginDescriptionFile pluginDescription, PluginPlatform.Multi platforms) Creates a newUpdateCheckerobjectUpdateChecker(@NotNull AnnoyingPlugin plugin, PluginPlatform.Multi platforms) Creates a newUpdateCheckerobject -
Method Summary
Methods inherited from class xyz.srnyx.annoyingapi.parents.AnnoyableClass
getAnnoyingPlugin
-
Field Details
-
latestVersion
The latest version of the plugin
-
-
Constructor Details
-
UpdateChecker
public UpdateChecker(@NotNull @NotNull AnnoyingPlugin annoyingPlugin, @NotNull @NotNull org.bukkit.plugin.PluginDescriptionFile pluginDescription, @NotNull PluginPlatform.Multi platforms) Creates a newUpdateCheckerobject- Parameters:
annoyingPlugin-AnnoyableClass.annoyingPluginpluginDescription-pluginNameandcurrentVersionplatforms-platforms
-
UpdateChecker
public UpdateChecker(@NotNull @NotNull AnnoyingPlugin annoyingPlugin, @NotNull @NotNull org.bukkit.plugin.PluginBase plugin, @NotNull PluginPlatform.Multi platforms) Creates a newUpdateCheckerobject- Parameters:
annoyingPlugin-AnnoyableClass.annoyingPluginplugin-pluginNameandcurrentVersionplatforms-platforms
-
UpdateChecker
public UpdateChecker(@NotNull @NotNull AnnoyingPlugin plugin, @NotNull PluginPlatform.Multi platforms) Creates a newUpdateCheckerobject- Parameters:
plugin-AnnoyableClass.annoyingPlugin,pluginName, andcurrentVersionplatforms-platforms
-
-
Method Details
-
toString
-
checkUpdate
public boolean checkUpdate()Checks if an update is available and sendsa messageto the console if it is- Returns:
trueif an update is available,falseotherwise
-
isUpdateAvailable
public boolean isUpdateAvailable()Checks if an update is available- Returns:
trueif an update is available,falseotherwise
-