Package stawa.vitalstrike
Class Errors.UpdateException
java.lang.Object
java.lang.Throwable
java.lang.Exception
stawa.vitalstrike.Errors.VitalStrikeException
stawa.vitalstrike.Errors.UpdateException
- All Implemented Interfaces:
Serializable
- Enclosing class:
Errors
Exception for update-related errors
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionUpdateException(String message) Creates a new UpdateException with the specified messageUpdateException(String message, String currentVersion, String latestVersion) Creates a new UpdateException with the specified message and version informationUpdateException(String message, Throwable cause) Creates a new UpdateException with the specified message and cause -
Method Summary
Modifier and TypeMethodDescriptionGets the current version of the pluginGets the latest available version of the pluginbooleanChecks if a newer version of the plugin is availableMethods inherited from class stawa.vitalstrike.Errors.VitalStrikeException
getErrorCodeMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
UpdateException
Creates a new UpdateException with the specified message- Parameters:
message- the error message
-
UpdateException
Creates a new UpdateException with the specified message and version information- Parameters:
message- the error messagecurrentVersion- the current version of the pluginlatestVersion- the latest available version
-
UpdateException
Creates a new UpdateException with the specified message and cause- Parameters:
message- the error messagecause- the cause of the error
-
-
Method Details
-
getCurrentVersion
Gets the current version of the plugin- Returns:
- the current version string, or null if not available
-
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
-