-
Notifications
You must be signed in to change notification settings - Fork 0
Running & Scheduling Update Checks
Jeremy Fail edited this page Apr 4, 2026
·
2 revisions
| Method | Behavior |
|---|---|
checkNow() |
Starts a check; uses the console as requestor for built-in requestor messaging. |
checkNow(Collection<? extends CommandSender> requestors) |
Same; null or empty = silent (no requestor-driven built-in messages). |
scheduleRepeating(long amount, TimeUnit unit) |
Repeating task: interval converted to ticks (millis / 50, minimum 1). First run is after one full interval, not immediately. Replaces any previous schedule (cancels the old task). Scheduled runs use silent checks (empty requestors). |
cancelScheduledChecks() |
Cancels the repeating task. |
Async work uses the server scheduler; results, PluginUpdateCheckEvent, and callbacks run synchronously on the main thread.
getScheduler() returns UpdateScheduler: runAsync, runSync, runSyncRepeating, cancelTask, backed by your plugin’s BukkitScheduler. Use it if you want other work to follow the same async/sync rules as the checker.
-
Default User-Agent (if you do not set a full override):
PluginUpdateChecker/<VERSION> (<plugin>/<version>; Minecraft/...; Bukkit/...; optional paid; optional uid/...; plus extra segments fromUserAgentBuilder`). -
setUserAgent(String)— full override;nullor empty restores default composition. -
getDefaultUserAgentBuilder()— append segments:appendRaw,appendPlugin,appendServerVersion,appendPaidVersion,appendUserId. -
setUserAgentResourceUserId(String)— addsuid/...in the default UA (for future marketplace-style use). -
setConnectTimeoutMs(int)—HttpURLConnectionconnect timeout;0= do not set (JVM default). Read timeout is not set by this library.