Contents
Enum Class HardcoreMode
- All Implemented Interfaces:
Serializable, Comparable<HardcoreMode>, Constable
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic HardcoreModeParses a configured mode name, matching case-insensitively.booleanshowsPersonalLives(int configuredLives) static HardcoreModeReturns the enum constant of this class with the specified name.static HardcoreMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
None
-
PerPlayer
-
Global
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
parse
Parses a configured mode name, matching case-insensitively.- Parameters:
value- The configured mode name, ornullwhen the config has no mode.- Returns:
- the matching mode, or
nullfornull. - 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.
-