Enum JSONOptions.ShowItemHoverDataMode
- java.lang.Object
-
- java.lang.Enum<JSONOptions.ShowItemHoverDataMode>
-
- net.kyori.adventure.text.serializer.json.JSONOptions.ShowItemHoverDataMode
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<JSONOptions.ShowItemHoverDataMode>
- Enclosing class:
- JSONOptions
public static enum JSONOptions.ShowItemHoverDataMode extends java.lang.Enum<JSONOptions.ShowItemHoverDataMode>
Configure how to emit show_item hovers.- Since:
- 4.17.0
-
-
Enum Constant Summary
Enum Constants Enum Constant Description EMIT_DATA_COMPONENTS
Only emit modern data components.EMIT_EITHER
Emit whichever of legacy or modern data the item has.EMIT_LEGACY_NBT
Only emit the pre-1.20.5 item nbt.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static JSONOptions.ShowItemHoverDataMode
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static JSONOptions.ShowItemHoverDataMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
EMIT_LEGACY_NBT
public static final JSONOptions.ShowItemHoverDataMode EMIT_LEGACY_NBT
Only emit the pre-1.20.5 item nbt.- Since:
- 4.17.0
-
EMIT_DATA_COMPONENTS
public static final JSONOptions.ShowItemHoverDataMode EMIT_DATA_COMPONENTS
Only emit modern data components.- Since:
- 4.17.0
-
EMIT_EITHER
public static final JSONOptions.ShowItemHoverDataMode EMIT_EITHER
Emit whichever of legacy or modern data the item has.- Since:
- 4.17.0
-
-
Method Detail
-
values
public static JSONOptions.ShowItemHoverDataMode[] 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.ShowItemHoverDataMode c : JSONOptions.ShowItemHoverDataMode.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.ShowItemHoverDataMode 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
-
-