Class UpdateChecker
java.lang.Object
net.dillon.dillonlib.util.UpdateChecker
A utility to see if your mod needs an update.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CompletableFuture<Boolean> checkForUpdate(String projectId, String currentVersion) Checks Modrinth for an update.static booleanChecks whether the latest version is newer.static intcompareVersions(String version1, String version2) Compares two numeric versions.static booleanhasUpdate(CompletableFuture<Boolean> completableFuture)
-
Constructor Details
-
UpdateChecker
public UpdateChecker()
-
-
Method Details
-
checkForUpdate
Checks Modrinth for an update.- Parameters:
projectId- the Modrinth project ID or slugcurrentVersion- the installed mod version- Returns:
- a future containing true if an update is available
-
hasUpdate
- Returns:
- if a mod has an update.
-
compare
-
compareVersions
-