Class UpdateChecker
java.lang.Object
dev.despical.mazeengine.util.UpdateChecker
Asks SpigotMC for the latest published resource version without blocking the server thread.
The request runs asynchronously and failures are logged only at a fine level, so an unreachable API never affects startup. A newer version is reported to the callback on the server thread; equal, older or unparsable versions are ignored.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidCallsonNeweron the server thread when the published version is newer than the running one.static booleanCompares dotted numeric versions; anything unparsable counts as not newer.
-
Method Details
-
check
public static void check(org.bukkit.plugin.java.JavaPlugin plugin, int resource, Consumer<String> onNewer) CallsonNeweron the server thread when the published version is newer than the running one.- Parameters:
plugin- the plugin whose version is comparedresource- the SpigotMC resource identifieronNewer- receives the latest published version
-
isNewer
-