Class UpdateStatus

java.lang.Object
io.github.projectunified.mcserverupdater.UpdateStatus

public final class UpdateStatus extends Object
The update status
  • Field Details

    • NO_PROJECT

      public static final UpdateStatus NO_PROJECT
      The project is not found or not supported
    • FILE_FAILED

      public static final UpdateStatus FILE_FAILED
      Failed to create the output file
    • UP_TO_DATE

      public static final UpdateStatus UP_TO_DATE
      The output file is up-to-date
    • OUT_OF_DATE

      public static final UpdateStatus OUT_OF_DATE
      The output file is out-of-date
    • SUCCESS

      public static final UpdateStatus SUCCESS
      Update successfully
    • FAILED

      public static final UpdateStatus FAILED
      Failed to update
  • Method Details

    • unknownError

      public static UpdateStatus unknownError(Throwable cause)
      Create an unknown error status
      Parameters:
      cause - the cause of the error
      Returns:
      the unknown error status
    • isSuccessStatus

      public boolean isSuccessStatus()
      Check if the update is successful
      Returns:
      true if the update is successful
    • getThrowable

      public Throwable getThrowable()
      Get the throwable
      Returns:
      the throwable, or null if there is no error
    • getMessage

      public String getMessage()
      Get the message
      Returns:
      the message