Class ModrinthUpdateChecker

java.lang.Object
com.zetaplugins.zetacore.services.updatechecker.UpdateChecker
com.zetaplugins.zetacore.services.updatechecker.ModrinthUpdateChecker

public class ModrinthUpdateChecker extends UpdateChecker
ModrinthUpdateChecker checks for updates of a JavaPlugin by querying the Modrinth API.
  • Constructor Details

    • ModrinthUpdateChecker

      public ModrinthUpdateChecker(JavaPlugin plugin, String projectId)
      Constructs a ModrinthUpdateChecker for the given plugin and project ID.
      Parameters:
      plugin - The JavaPlugin to check updates for
      projectId - The Modrinth project ID
  • Method Details

    • checkForUpdates

      public void checkForUpdates(boolean logMessage)
      Description copied from class: UpdateChecker
      Checks for updates for the plugin.
      Specified by:
      checkForUpdates in class UpdateChecker
      Parameters:
      logMessage - If true, logs a message if a new version is available
    • getLatestVersionUrl

      public String getLatestVersionUrl()
      Specified by:
      getLatestVersionUrl in class UpdateChecker
    • getVersionUrl

      public String getVersionUrl(String version)