Class UpdateChecker

java.lang.Object
my.celium.org.update.UpdateChecker

public final class UpdateChecker extends Object
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 Details

    • check

      public static void check(ModMetadata mod)
      Queues an update check for mod. No-op when globally disabled, when the mod has no updateUrl, or when a fresh cached result exists.
    • lastResult

      public static UpdateResult lastResult(String modId)
      Last result for a mod, or null when never checked.