Package net.kyori.adventure.text.event
Interface HoverEventSource<V>
- 
- Type Parameters:
 V- the value type
- All Known Subinterfaces:
 BlockNBTComponent,BuildableComponent<C,B>,Component,EntityNBTComponent,KeybindComponent,NBTComponent<C,B>,ScopedComponent<C>,ScoreComponent,SelectorComponent,StorageNBTComponent,TextComponent,TranslatableComponent
- All Known Implementing Classes:
 AbstractComponent,HoverEvent
public interface HoverEventSource<V>Something that can provide aHoverEvent.- Since:
 - 4.0.0
 
 
- 
- 
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default @NotNull HoverEvent<V>asHoverEvent()Represent this object as a hover event.@NotNull HoverEvent<V>asHoverEvent(@NotNull java.util.function.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 Detail
- 
unbox
@Nullable static <V> @Nullable HoverEvent<V> unbox(@Nullable @Nullable HoverEventSource<V> source)
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
@NotNull default @NotNull HoverEvent<V> asHoverEvent()
Represent this object as a hover event.- Returns:
 - a hover event
 - Since:
 - 4.0.0
 
 
- 
asHoverEvent
@NotNull @NotNull HoverEvent<V> asHoverEvent(@NotNull @NotNull java.util.function.UnaryOperator<V> op)
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
 
 
 - 
 
 -