Class ShutdownReason

java.lang.Object
com.hypixel.hytale.server.core.ShutdownReason

public class ShutdownReason extends Object
Since:
14/11/17
Version:
1.0
  • Field Details

    • SIGINT

      public static final ShutdownReason SIGINT
      Normal server shutdown
    • SHUTDOWN

      public static final ShutdownReason SHUTDOWN
      Normal server shutdown
    • CRASH

      public static final ShutdownReason CRASH
      Generic crash reason
    • AUTH_FAILED

      public static final ShutdownReason AUTH_FAILED
      Auth failed to initialise and the server can't continue
    • WORLD_GEN

      public static final ShutdownReason WORLD_GEN
      If the WorldGen config failed to load
    • CLIENT_GONE

      public static final ShutdownReason CLIENT_GONE
      If the singleplayer client crashes without shutting down the server and we detect this with ProcessUtil.isProcessRunning(int)
    • MISSING_REQUIRED_PLUGIN

      public static final ShutdownReason MISSING_REQUIRED_PLUGIN
      If the server starts and is missing the mods/plugins that are specified in HytaleServerConfig.getModConfig()
    • VALIDATE_ERROR

      public static final ShutdownReason VALIDATE_ERROR
      Used when we failed to validate some data that is required.
    • MISSING_ASSETS

      public static final ShutdownReason MISSING_ASSETS
      Used when the server fails to load any asset packs.
    • UPDATE

      public static final ShutdownReason UPDATE
      Used when the server should restart to apply a staged update. The launcher script detects this code and applies the update before restarting.
    • MOD_ERROR

      public static final ShutdownReason MOD_ERROR
    • VERIFY_ERROR

      public static final ShutdownReason VERIFY_ERROR
    • INVALID_INSTALL_DIR

      public static final ShutdownReason INVALID_INSTALL_DIR
      The working directory is inside the launcher install path.
  • Constructor Details

    • ShutdownReason

      public ShutdownReason(int exitCode, @Nonnull String name)
    • ShutdownReason

      public ShutdownReason(int exitCode, @Nonnull String name, @Nullable FormattedMessage message)
  • Method Details

    • getExitCode

      public int getExitCode()
    • getName

      @Nonnull public String getName()
      Returns:
      a unique name for this reason
    • getMessage

      @Nullable public String getMessage()
      Returns the raw message content as a plain string for logging and simple display. For rich formatted display, use getFormattedMessage() instead.
    • getFormattedMessage

      @Nullable public FormattedMessage getFormattedMessage()
      Returns the formatted message for protocol and rich display.
    • withMessage

      @Nonnull public ShutdownReason withMessage(@Nonnull Message message)
      Returns a new ShutdownReason with the given message.
    • toTelemetryString

      public String toTelemetryString()
      Returns:
      the telemetry string combining name and message (e.g., "crash: OutOfMemoryError")
    • toString

      public String toString()
      Overrides:
      toString in class Object