Class SpigotUpdateChecker


  • public class SpigotUpdateChecker
    extends java.lang.Object
    Class used to check for updates on Spigot resources Useful for closed source/premium plugins
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getNewVersion()
      Get the string for the latest version, this could be used when informing the user about an update to show how far behind they are
      boolean isUpdateAvailable()
      Check if there is an update available on Spigot
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SpigotUpdateChecker

        public SpigotUpdateChecker​(LapisCorePlugin plugin,
                                   java.lang.String resourceID)
        Setup the Update Checker
        Parameters:
        plugin - The plugin that you wish to report to
        resourceID - The Spigot resource ID e.g. LapisBans = 58896
    • Method Detail

      • isUpdateAvailable

        public boolean isUpdateAvailable()
        Check if there is an update available on Spigot
        Returns:
        Returns true if there is a different version as the latest on spigot, false if the versions match
      • getNewVersion

        public java.lang.String getNewVersion()
        Get the string for the latest version, this could be used when informing the user about an update to show how far behind they are
        Returns:
        Returns the latest version on spigot