Class VersionStringUpdateChecker

java.lang.Object
net.lucypoulton.squirtgun.update.UpdateChecker
net.lucypoulton.squirtgun.update.VersionStringUpdateChecker
Direct Known Subclasses:
SpigotUpdateChecker

public class VersionStringUpdateChecker extends UpdateChecker
Update checking mechanism that compares a string fetched from a URL with the current version.
  • Constructor Details

    • VersionStringUpdateChecker

      protected VersionStringUpdateChecker(SquirtgunPlugin<?> plugin, String url, net.kyori.adventure.text.Component updateMessage, String listenerPermission)
  • Method Details

    • checkDataForUpdate

      protected boolean checkDataForUpdate(String input)
      Description copied from class: UpdateChecker
      Check if the result of a request indicates an update is available.
      Specified by:
      checkDataForUpdate in class UpdateChecker
      Parameters:
      input - the string result of a HTTP GET request from the URL provided to the constructor
      Returns:
      whether the data provided shows an update available. In the event of an error, a warning should be printed to the console and this should return false.