Package net.lucypoulton.squirtgun.update
Class VersionStringUpdateChecker
java.lang.Object
net.lucypoulton.squirtgun.update.UpdateChecker
net.lucypoulton.squirtgun.update.VersionStringUpdateChecker
- Direct Known Subclasses:
SpigotUpdateChecker
Update checking mechanism that compares a string fetched from a URL with the current version.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedVersionStringUpdateChecker(SquirtgunPlugin<?> plugin, String url, net.kyori.adventure.text.Component updateMessage, String listenerPermission) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancheckDataForUpdate(String input)Check if the result of a request indicates an update is available.Methods inherited from class net.lucypoulton.squirtgun.update.UpdateChecker
checkDataForUpdate, checkForUpdate, getListenerPermission, getPlugin, getUpdateMessage
-
Constructor Details
-
VersionStringUpdateChecker
protected VersionStringUpdateChecker(SquirtgunPlugin<?> plugin, String url, net.kyori.adventure.text.Component updateMessage, String listenerPermission)
-
-
Method Details
-
checkDataForUpdate
Description copied from class:UpdateCheckerCheck if the result of a request indicates an update is available.- Specified by:
checkDataForUpdatein classUpdateChecker- 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.
-