Package me.croabeast.common.updater
Class UpdateResult
java.lang.Object
me.croabeast.common.updater.UpdateResult
Represents the outcome of an update check, encapsulating the comparison result
between the locally installed plugin version and the fetched remote version.
Contains the reason code for the check, the local version, the fetched version, and any exception that occurred during the check.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the version string that should be considered the "latest" for this check.booleanDetermines whether the update check has identified a newer version available.
-
Method Details
-
requiresUpdate
public boolean requiresUpdate()Determines whether the update check has identified a newer version available.- Returns:
trueifisinvalid reference
#getReason()Reason.NEW_UPDATE;falseotherwise.
-
getLatest
Returns the version string that should be considered the "latest" for this check.If an update is required, returns the fetched remote version; otherwise, returns the local version.
- Returns:
- the fetched version if an update is available, or the local version otherwise
-