Class ADPUpdater


  • public class ADPUpdater
    extends Object
    • Constructor Detail

      • ADPUpdater

        public ADPUpdater()
    • Method Detail

      • reload

        public void reload​(String pluginResourceId,
                           boolean checkForUpdates,
                           boolean warnUpdates,
                           ADPPermission warnPermission,
                           String warnMessage)
        Reload updater
        Parameters:
        pluginResourceId - id of the spigot plugin
        checkForUpdates - toggle check for updates
        warnUpdates - toggle warnings on new updates
        warnPermission - permission necessary to receive the warning
        warnMessage - the warning message
      • asyncTaskCheckUpdates

        public void asyncTaskCheckUpdates()
        Make asynchronous task to check for updates every day
      • asyncCheckUpdates

        public void asyncCheckUpdates()
        Asynchronous check for updates
      • checkVersion

        public boolean checkVersion​(String remoteVersion,
                                    String currentVersion)
        Parse latest version
        Parameters:
        remoteVersion - current version
        currentVersion - string version to compare with the current one
        Returns:
        true if the version is newer than the given one