Class AnnoyingUpdate

  • All Implemented Interfaces:
    Annoyable

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

      • latestVersion

        @Nullable
        public final @Nullable xyz.srnyx.javautilities.objects.SemanticVersion latestVersion
        The latest version of the plugin
    • Constructor Detail

      • 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 Detail

      • 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