Class UpdateChecker
java.lang.Object
my.celium.org.update.UpdateChecker
Optional asynchronous update checker.
Guarantees:
- never blocks the game thread or startup (everything runs on Mycel's shared background pool);
- strict timeouts (8s connect, 12s total) and a 256 KiB response cap;
- HTTPS only - any other scheme is refused;
- results cached per mod (re-checked at most once per 6 hours);
- at most one chatty line per mod with an update; everything else is debug;
- any failure (DNS, TLS, HTTP error, malformed JSON) degrades to silence.
Expected document shape (extra fields ignored):
{"version": "1.2.0", "url": "https://example.com/mymod"}
A mod opts in by setting updateUrl in its ModMetadata and
opts out by leaving it null. The global mycel.json flag
enableUpdateChecker disables all checks. No update service is
hardcoded - any HTTPS endpoint serving the shape above works.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheck(ModMetadata mod) Queues an update check formod.static UpdateResultlastResult(String modId) Last result for a mod, ornullwhen never checked.
-
Method Details
-
check
Queues an update check formod. No-op when globally disabled, when the mod has noupdateUrl, or when a fresh cached result exists. -
lastResult
Last result for a mod, ornullwhen never checked.
-