Class UpdateChecker

java.lang.Object
net.dillon.dillonlib.util.UpdateChecker

public class UpdateChecker extends Object
A utility to see if your mod needs an update.
  • Constructor Details

    • UpdateChecker

      public UpdateChecker()
  • Method Details

    • checkForUpdate

      public static CompletableFuture<Boolean> checkForUpdate(String projectId, String currentVersion)
      Checks Modrinth for an update.
      Parameters:
      projectId - the Modrinth project ID or slug
      currentVersion - the installed mod version
      Returns:
      a future containing true if an update is available
    • hasUpdate

      public static boolean hasUpdate(CompletableFuture<Boolean> completableFuture)
      Returns:
      if a mod has an update.
    • compare

      public static boolean compare(String currentVersion, String latestVersion)
      Checks whether the latest version is newer.
    • compareVersions

      public static int compareVersions(String version1, String version2)
      Compares two numeric versions.