Package xyz.srnyx.annoyingapi
Class AnnoyingUpdate
java.lang.Object
xyz.srnyx.javautilities.parents.Stringable
xyz.srnyx.annoyingapi.AnnoyingUpdate
- All Implemented Interfaces:
Annoyable
Class for handling update checking
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal @Nullable xyz.srnyx.javautilities.objects.SemanticVersionThe latest version of the plugin -
Constructor Summary
ConstructorsConstructorDescriptionAnnoyingUpdate(@NotNull AnnoyingPlugin annoyingPlugin, @NotNull org.bukkit.plugin.PluginBase plugin, PluginPlatform.Multi platforms) Creates a newAnnoyingUpdateobjectAnnoyingUpdate(@NotNull AnnoyingPlugin annoyingPlugin, @NotNull org.bukkit.plugin.PluginDescriptionFile pluginDescription, PluginPlatform.Multi platforms) Creates a newAnnoyingUpdateobjectAnnoyingUpdate(@NotNull AnnoyingPlugin plugin, PluginPlatform.Multi platforms) Creates a newAnnoyingUpdateobject -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if an update is available and sendsa messageto the console if it is@NotNull AnnoyingPluginTheAnnoyingPlugininstancebooleanChecks if an update is availableMethods inherited from class xyz.srnyx.javautilities.parents.Stringable
toString, toString, toString, toString, toString
-
Field Details
-
latestVersion
@Nullable public final @Nullable xyz.srnyx.javautilities.objects.SemanticVersion latestVersionThe latest version of the plugin
-
-
Constructor Details
-
AnnoyingUpdate
public AnnoyingUpdate(@NotNull @NotNull AnnoyingPlugin annoyingPlugin, @NotNull @NotNull org.bukkit.plugin.PluginDescriptionFile pluginDescription, @NotNull PluginPlatform.Multi platforms) Creates a newAnnoyingUpdateobject- Parameters:
annoyingPlugin-annoyingPluginpluginDescription-pluginNameandcurrentVersionplatforms-platforms
-
AnnoyingUpdate
public AnnoyingUpdate(@NotNull @NotNull AnnoyingPlugin annoyingPlugin, @NotNull @NotNull org.bukkit.plugin.PluginBase plugin, @NotNull PluginPlatform.Multi platforms) Creates a newAnnoyingUpdateobject- Parameters:
annoyingPlugin-annoyingPluginplugin-pluginNameandcurrentVersionplatforms-platforms
-
AnnoyingUpdate
public AnnoyingUpdate(@NotNull @NotNull AnnoyingPlugin plugin, @NotNull PluginPlatform.Multi platforms) Creates a newAnnoyingUpdateobject- Parameters:
plugin-annoyingPlugin,pluginName, andcurrentVersionplatforms-platforms
-
-
Method Details
-
getAnnoyingPlugin
Description copied from interface:AnnoyableTheAnnoyingPlugininstance- Specified by:
getAnnoyingPluginin interfaceAnnoyable- Returns:
- the plugin instance
-
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
-