Enum JSONOptions.HoverEventValueMode
- java.lang.Object
-
- java.lang.Enum<JSONOptions.HoverEventValueMode>
-
- net.kyori.adventure.text.serializer.json.JSONOptions.HoverEventValueMode
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<JSONOptions.HoverEventValueMode>
- Enclosing class:
- JSONOptions
public static enum JSONOptions.HoverEventValueMode extends java.lang.Enum<JSONOptions.HoverEventValueMode>
Configure how to emit hover event values.- Since:
- 4.15.0
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BOTH
Include both modern and legacy hover event fields, for maximum compatibility.LEGACY_ONLY
Only emit the pre-1.16 hover eventvalue
field.MODERN_ONLY
Only emit the 1.16+ modern hover events.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static JSONOptions.HoverEventValueMode
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static JSONOptions.HoverEventValueMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
MODERN_ONLY
public static final JSONOptions.HoverEventValueMode MODERN_ONLY
Only emit the 1.16+ modern hover events.- Since:
- 4.15.0
-
LEGACY_ONLY
public static final JSONOptions.HoverEventValueMode LEGACY_ONLY
Only emit the pre-1.16 hover eventvalue
field.- Since:
- 4.15.0
-
BOTH
public static final JSONOptions.HoverEventValueMode BOTH
Include both modern and legacy hover event fields, for maximum compatibility.- Since:
- 4.15.0
-
-
Method Detail
-
values
public static JSONOptions.HoverEventValueMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (JSONOptions.HoverEventValueMode c : JSONOptions.HoverEventValueMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JSONOptions.HoverEventValueMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-