Enum Class MessageRecord.Field
java.lang.Object
java.lang.Enum<MessageRecord.Field>
com.winterhavenmc.library.messagebuilder.model.language.MessageRecord.Field
- All Implemented Interfaces:
Serializable
,Comparable<MessageRecord.Field>
,Constable
- Enclosing interface:
MessageRecord
Enum representing the fields defined in a
ValidMessageRecord
.
Each constant in this enum maps to a specific key in the YAML configuration. This enum provides a single source of truth for these keys, which may be decoupled from the enum constant names in the future.
This design ensures central schema management and supports future extensions such as metadata annotations or type hints per field.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptiontoKey()
Returns the raw YAML key string associated with this field.static MessageRecord.Field
Returns the enum constant of this class with the specified name.static MessageRecord.Field[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ENABLED
-
REPEAT_DELAY
-
MESSAGE_TEXT
-
TITLE_TEXT
-
TITLE_FADE_IN
-
TITLE_STAY
-
TITLE_FADE_OUT
-
SUBTITLE_TEXT
-
-
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
-
toKey
Returns the raw YAML key string associated with this field.- Returns:
- the field key string
-