Package net.kyori.adventure.text.event
Class HoverEvent.Action<V>
- java.lang.Object
-
- net.kyori.adventure.text.event.HoverEvent.Action<V>
-
- Type Parameters:
V- the value type an action handles
- Enclosing class:
- HoverEvent<V>
public static final class HoverEvent.Action<V> extends java.lang.ObjectAn enumeration of hover event actions.- Since:
- 4.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static Index<java.lang.String,HoverEvent.Action<?>>NAMESThe name map.static HoverEvent.Action<java.lang.String>SHOW_ACHIEVEMENTDeprecated.Removed in Vanilla 1.12, but we keep it for backwards compatstatic HoverEvent.Action<HoverEvent.ShowEntity>SHOW_ENTITYShows an entity when hovered over.static HoverEvent.Action<HoverEvent.ShowItem>SHOW_ITEMShows an item instance when hovered over.static HoverEvent.Action<Component>SHOW_TEXTShows aComponentwhen hovered over.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanreadable()Tests if this action is readable.@NotNull java.lang.StringtoString()@NotNull java.lang.Class<V>type()Gets the value type.
-
-
-
Field Detail
-
SHOW_TEXT
public static final HoverEvent.Action<Component> SHOW_TEXT
Shows aComponentwhen hovered over.- Since:
- 4.0.0
-
SHOW_ITEM
public static final HoverEvent.Action<HoverEvent.ShowItem> SHOW_ITEM
Shows an item instance when hovered over.- Since:
- 4.0.0
-
SHOW_ENTITY
public static final HoverEvent.Action<HoverEvent.ShowEntity> SHOW_ENTITY
Shows an entity when hovered over.- Since:
- 4.0.0
-
SHOW_ACHIEVEMENT
@Deprecated public static final HoverEvent.Action<java.lang.String> SHOW_ACHIEVEMENT
Deprecated.Removed in Vanilla 1.12, but we keep it for backwards compatShows aComponentwhen hovered over.- Since:
- 4.14.0
-
NAMES
public static final Index<java.lang.String,HoverEvent.Action<?>> NAMES
The name map.- Since:
- 4.0.0
-
-
Method Detail
-
type
@NotNull public @NotNull java.lang.Class<V> type()
Gets the value type.- Returns:
- the value type
- Since:
- 4.0.0
-
readable
public boolean readable()
Tests if this action is readable.- Returns:
trueif this action is readable,falseif this action is not readable- Since:
- 4.0.0
-
toString
@NotNull public @NotNull java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-