Interface HoverEventSource<V>
- Type Parameters:
V- the value type
- All Known Subinterfaces:
BlockNBTComponent, Component, EntityNBTComponent, KeybindComponent, NBTComponent<C>, ObjectComponent, ScopedComponent<C>, ScoreComponent, SelectorComponent, StorageNBTComponent, TextComponent, TranslatableComponent, VirtualComponent
- All Known Implementing Classes:
HoverEvent
-
Method Summary
Modifier and TypeMethodDescriptiondefault HoverEvent<V> Represent this object as a hover event.asHoverEvent(UnaryOperator<V> op) Creates a hover event with value derived from this object.static <V> @Nullable HoverEvent<V> unbox(@Nullable HoverEventSource<V> source) Fetches aHoverEventfrom aHoverEventSource.
-
Method Details
-
unbox
Fetches aHoverEventfrom aHoverEventSource.- Type Parameters:
V- the value type- Parameters:
source- the hover event source- Returns:
- a hover event, or
null - Since:
- 4.0.0
-
asHoverEvent
Represent this object as a hover event.- Returns:
- a hover event
- Since:
- 4.0.0
-
asHoverEvent
Creates a hover event with value derived from this object.The event value will be passed through the provided callback to allow transforming the original value of the event.
- Parameters:
op- transformation on value- Returns:
- a hover event
- Since:
- 4.0.0
-