Class AnnoyingUpdate

java.lang.Object
xyz.srnyx.javautilities.parents.Stringable
xyz.srnyx.annoyingapi.AnnoyingUpdate
All Implemented Interfaces:
Annoyable

public class AnnoyingUpdate extends xyz.srnyx.javautilities.parents.Stringable implements Annoyable
Class for handling update checking
  • Field Details

    • latestVersion

      @Nullable public final @Nullable xyz.srnyx.javautilities.objects.SemanticVersion latestVersion
      The 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 new AnnoyingUpdate object
      Parameters:
      annoyingPlugin - annoyingPlugin
      pluginDescription - pluginName and currentVersion
      platforms - platforms
    • AnnoyingUpdate

      public AnnoyingUpdate(@NotNull @NotNull AnnoyingPlugin annoyingPlugin, @NotNull @NotNull org.bukkit.plugin.PluginBase plugin, @NotNull PluginPlatform.Multi platforms)
      Creates a new AnnoyingUpdate object
      Parameters:
      annoyingPlugin - annoyingPlugin
      plugin - pluginName and currentVersion
      platforms - platforms
    • AnnoyingUpdate

      public AnnoyingUpdate(@NotNull @NotNull AnnoyingPlugin plugin, @NotNull PluginPlatform.Multi platforms)
      Creates a new AnnoyingUpdate object
      Parameters:
      plugin - annoyingPlugin, pluginName, and currentVersion
      platforms - platforms
  • Method Details

    • getAnnoyingPlugin

      @NotNull public @NotNull AnnoyingPlugin getAnnoyingPlugin()
      Description copied from interface: Annoyable
      The AnnoyingPlugin instance
      Specified by:
      getAnnoyingPlugin in interface Annoyable
      Returns:
      the plugin instance
    • checkUpdate

      public boolean checkUpdate()
      Checks if an update is available and sends a message to the console if it is
      Returns:
      true if an update is available, false otherwise
    • isUpdateAvailable

      public boolean isUpdateAvailable()
      Checks if an update is available
      Returns:
      true if an update is available, false otherwise