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.Object
An enumeration of hover event actions.- Since:
- 4.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static Index<java.lang.String,HoverEvent.Action<?>>
NAMES
The name map.static HoverEvent.Action<java.lang.String>
SHOW_ACHIEVEMENT
Deprecated.Removed in Vanilla 1.12, but we keep it for backwards compatstatic HoverEvent.Action<HoverEvent.ShowEntity>
SHOW_ENTITY
Shows an entity when hovered over.static HoverEvent.Action<HoverEvent.ShowItem>
SHOW_ITEM
Shows an item instance when hovered over.static HoverEvent.Action<Component>
SHOW_TEXT
Shows aComponent
when hovered over.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
readable()
Tests if this action is readable.@NotNull java.lang.String
toString()
@NotNull java.lang.Class<V>
type()
Gets the value type.
-
-
-
Field Detail
-
SHOW_TEXT
public static final HoverEvent.Action<Component> SHOW_TEXT
Shows aComponent
when 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 aComponent
when 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:
true
if this action is readable,false
if this action is not readable- Since:
- 4.0.0
-
toString
@NotNull public @NotNull java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-