Package one.tranic.t.base.updater
Class ModrinthVersionFetcher
java.lang.Object
one.tranic.t.base.updater.VersionFetcher
one.tranic.t.base.updater.ModrinthVersionFetcher
- All Implemented Interfaces:
AutoCloseable,Runnable
-
Constructor Summary
ConstructorsConstructorDescriptionModrinthVersionFetcher(String currentVersion, String pluginName, String slug, Loaders loaders) -
Method Summary
Modifier and TypeMethodDescriptionFetches the latest version of the associated plugin or resource from the update server.Methods inherited from class one.tranic.t.base.updater.VersionFetcher
close, getLatestVersion, getNoUpdateMessage, getResourceURL, getUpdateMessage, hasUpdate, isExpired, run, start, updateResourceURL
-
Constructor Details
-
ModrinthVersionFetcher
-
-
Method Details
-
fetchLatestVersion
Description copied from class:VersionFetcherFetches the latest version of the associated plugin or resource from the update server.This method establishes a connection to the specified update server URL, reads the response, and retrieves the latest version information as a string. If an error occurs during the process, the stack trace is printed, and the method returns null.
- Overrides:
fetchLatestVersionin classVersionFetcher- Returns:
- the latest version as a string, or null if an error occurs or the version cannot be retrieved
-