Class VersionChecker
java.lang.Object
com.xpdustry.claj.client.util.VersionChecker
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckAsyncFor(String repo, String version, String name, boolean promptStatus, arc.func.Cons<VersionChecker.UpdateState> finished) static voidcheckAsyncFor(mindustry.mod.Mods.ModMeta mod, boolean promptStatus, arc.func.Cons<VersionChecker.UpdateState> finished) static voidcheckAsyncFor(mindustry.mod.Mods.ModMeta mod, arc.func.Cons<VersionChecker.UpdateState> finished) static <T extends mindustry.mod.Mod>
voidcheckAsyncFor(T mod, boolean promptStatus, arc.func.Cons<VersionChecker.UpdateState> finished) static <T extends mindustry.mod.Mod>
voidcheckAsyncFor(T mod, arc.func.Cons<VersionChecker.UpdateState> finished) static VersionChecker.UpdateStatestatic VersionChecker.UpdateStatecheckFor(mindustry.mod.Mods.ModMeta mod) static VersionChecker.UpdateStatecheckFor(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).static <T extends mindustry.mod.Mod>
VersionChecker.UpdateStatecheckFor(T mod) static <T extends mindustry.mod.Mod>
VersionChecker.UpdateStatecheckFor(T mod, boolean promptStatus)
-
Field Details
-
versionKey
-
releaseAssetsKey
-
downloadUrlKey
-
latestVersionName
-
repoLinkFormat
-
repoApiLinkFormat
-
-
Constructor Details
-
VersionChecker
public VersionChecker()
-
-
Method Details
-
checkFor
-
checkFor
public static <T extends mindustry.mod.Mod> VersionChecker.UpdateState checkFor(T mod, boolean promptStatus) -
checkFor
-
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)
-