Package com.ultikits.ultitools.utils
Class VersionUtils
java.lang.Object
com.ultikits.ultitools.utils.VersionUtils
Utility class for version checking and comparison operations.
Provides methods to check for plugin updates and compare semantic versions.
- Since:
- 6.0.0
- Author:
- wisdomme
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringGet the newest version of UltiTools from the remote API.static VersionLookupLooks up the newest UltiTools version and says whether the lookup established anything (Phase 19, D19-032).
-
Constructor Details
-
VersionUtils
public VersionUtils()
-
-
Method Details
-
getUltiToolsNewestVersion
Get the newest version of UltiTools from the remote API.Returns
nullwhen the catalogue answers with an error status, a body without adata.version, or a body that cannot be read, and when it cannot be reached; this contract is unchanged as of 6.3.0. The start-up update check useslookUpUltiToolsNewestVersion()instead, which tells those failures apart from a version.- Returns:
- the newest UltiTools version string, or
null
-
lookUpUltiToolsNewestVersion
Looks up the newest UltiTools version and says whether the lookup established anything (Phase 19, D19-032).VersionLookup.Outcome.FOUNDcarries the version exactly asgetUltiToolsNewestVersion()returns it; every case that method answers withnullisVersionLookup.Outcome.FAILEDhere, because the catalogue always names a newest version when it answers normally.An exception thrown while asking (for example a class that can no longer be loaded while the plugin is disabling) propagates, exactly as it does from
getUltiToolsNewestVersion().- Returns:
- the lookup's outcome, never
null - Since:
- 6.3.0
-