Enum Class HardcoreMode

java.lang.Object
java.lang.Enum<HardcoreMode>
com.hypixel.hytale.server.core.universe.hardcore.HardcoreMode
All Implemented Interfaces:
Serializable, Comparable<HardcoreMode>, Constable

public enum HardcoreMode extends Enum<HardcoreMode>
How the universe handles player deaths in hardcore play.

Every mode except None converts exhausted players to the configured death gamemode type (Defaults.GameModeTypeOnDeath). The mode only decides whose lives a death burns; Defaults.HardcoreLives decides how many there are:

  • None: deaths are not limited.
  • PerPlayer: each player has their own lives. The last death converts that player while the others keep playing.
  • Global: the universe shares one pool of lives. Every death burns one. When the pool is empty, the run ends for everyone.
The named choices the world creation form offers (Permadeath, Three Strikes, Nine Lives, Soulbound) are client presets over a mode and a lives count (AppMainMenu.HardcoreModes).
  • Enum Constant Details

  • Method Details

    • values

      public static HardcoreMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static HardcoreMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • parse

      @Nullable public static HardcoreMode parse(@Nullable String value)
      Parses a configured mode name, matching case-insensitively.
      Parameters:
      value - The configured mode name, or null when the config has no mode.
      Returns:
      the matching mode, or null for null.
      Throws:
      IllegalArgumentException - if the name matches no mode. A bad config fails the boot instead of silently losing hardcore enforcement.
    • showsPersonalLives

      public boolean showsPersonalLives(int configuredLives)
      Parameters:
      configuredLives - The configured lives count (Defaults.HardcoreLives), at least one by config validation.
      Returns:
      whether the player list and the death screen surface a per-player count. A single-life world reads as permadeath, so no count is shown.