Class SpigotVersionFetcher

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

public class SpigotVersionFetcher extends VersionFetcher
The FetchVersion class is responsible for managing the fetching and updating of a plugin's version.

It performs periodic version checks, determines whether an update is available, and provides formatted messages displaying update statuses.

This class implements both the AutoCloseable and Runnable interfaces for resource management and asynchronous operations, respectively.

  • Constructor Details

    • SpigotVersionFetcher

      public SpigotVersionFetcher(String currentVersion, String pluginName, String resourceId)
      Constructs a FetchVersion instance for version checking and updating purposes.
      Parameters:
      currentVersion - the current version of the associated plugin or application.
      pluginName - the name of the plugin or application being checked for updates.
      resourceId - the unique identifier for the resource being checked, typically corresponding to its ID on the update server.
    • SpigotVersionFetcher

      public SpigotVersionFetcher(String currentVersion, String pluginName, String resourceId, String resourceURL)
      Constructs a new FetchVersion instance responsible for managing version fetching and updates.
      Parameters:
      currentVersion - the current version of the plugin as a String
      pluginName - the name of the plugin the version fetch is associated with
      resourceId - the resource ID of the plugin on the platform
      resourceURL - the URL of the resource; if null, a default URL is generated based on the resourceId