Class Errors.UpdateException

All Implemented Interfaces:
Serializable
Enclosing class:
Errors

public static class Errors.UpdateException extends Errors.VitalStrikeException
Exception for update-related errors
See Also:
  • Constructor Details

    • UpdateException

      public UpdateException(String message)
      Creates a new UpdateException with the specified message
      Parameters:
      message - the error message
    • UpdateException

      public UpdateException(String message, String currentVersion, String latestVersion)
      Creates a new UpdateException with the specified message and version information
      Parameters:
      message - the error message
      currentVersion - the current version of the plugin
      latestVersion - the latest available version
    • UpdateException

      public UpdateException(String message, Throwable cause)
      Creates a new UpdateException with the specified message and cause
      Parameters:
      message - the error message
      cause - the cause of the error
  • Method Details

    • getCurrentVersion

      public String getCurrentVersion()
      Gets the current version of the plugin
      Returns:
      the current version string, or null if not available
    • getLatestVersion

      public String getLatestVersion()
      Gets the latest available version of the plugin
      Returns:
      the latest version string, or null if not available
    • isUpdateAvailable

      public boolean isUpdateAvailable()
      Checks if a newer version of the plugin is available
      Returns:
      true if both current and latest versions are available and different, false otherwise