Class ModrinthVersionFetcher

java.lang.Object
one.tranic.t.base.updater.VersionFetcher
one.tranic.t.base.updater.ModrinthVersionFetcher
All Implemented Interfaces:
AutoCloseable, Runnable

public class ModrinthVersionFetcher extends VersionFetcher
  • Constructor Details

    • ModrinthVersionFetcher

      public ModrinthVersionFetcher(String currentVersion, String pluginName, String slug, Loaders loaders)
  • Method Details

    • fetchLatestVersion

      public String fetchLatestVersion()
      Description copied from class: VersionFetcher
      Fetches 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:
      fetchLatestVersion in class VersionFetcher
      Returns:
      the latest version as a string, or null if an error occurs or the version cannot be retrieved