Class VersionChecker

java.lang.Object
com.xpdustry.claj.client.util.VersionChecker

public class VersionChecker extends Object
  • Field Details

    • versionKey

      public static String versionKey
    • releaseAssetsKey

      public static String releaseAssetsKey
    • downloadUrlKey

      public static String downloadUrlKey
    • latestVersionName

      public static String latestVersionName
    • repoLinkFormat

      public static String repoLinkFormat
    • repoApiLinkFormat

      public static String repoApiLinkFormat
  • Constructor Details

    • VersionChecker

      public VersionChecker()
  • Method Details

    • checkFor

      public static <T extends mindustry.mod.Mod> VersionChecker.UpdateState checkFor(T mod)
    • checkFor

      public static <T extends mindustry.mod.Mod> VersionChecker.UpdateState checkFor(T mod, boolean promptStatus)
    • checkFor

      public static VersionChecker.UpdateState checkFor(mindustry.mod.Mods.ModMeta mod)
    • checkFor

      public static VersionChecker.UpdateState checkFor(mindustry.mod.Mods.ModMeta mod, boolean promptStatus)
      Check for update using the "version" and "repo" properties in the mod/plugin definition (<plugin/mod>.[h]json).

      The github repo must be formatted like that "<username>/<repo-name>".
      The version must be formatted like that "146.2" and can starts with "v", but must not contains letters, like "beta" or "-dev".

      Returns:
      the update state of the mod
    • checkFor

      public static VersionChecker.UpdateState checkFor(String repo, String version, String name, boolean promptStatus)
    • checkAsyncFor

      public static <T extends mindustry.mod.Mod> void checkAsyncFor(T mod, arc.func.Cons<VersionChecker.UpdateState> finished)
    • checkAsyncFor

      public static <T extends mindustry.mod.Mod> void checkAsyncFor(T mod, boolean promptStatus, arc.func.Cons<VersionChecker.UpdateState> finished)
    • checkAsyncFor

      public static void checkAsyncFor(mindustry.mod.Mods.ModMeta mod, arc.func.Cons<VersionChecker.UpdateState> finished)
    • checkAsyncFor

      public static void checkAsyncFor(mindustry.mod.Mods.ModMeta mod, boolean promptStatus, arc.func.Cons<VersionChecker.UpdateState> finished)
    • checkAsyncFor

      public static void checkAsyncFor(String repo, String version, String name, boolean promptStatus, arc.func.Cons<VersionChecker.UpdateState> finished)