@Test void testAsHoverEvent() { final HoverEvent<Component> event = HoverEvent.showText(Component.text("kittens")); assertSame(event, event.asHoverEvent()); assertSame(event, event.asHoverEvent(UnaryOperator.identity())); assertEquals(HoverEvent.showText(Component.text("cats")), event.asHoverEvent(old -> Component.text("cats"))); }
@Override public @NonNull HoverEvent<V> asHoverEvent() { return this; }
HoverEvent implements Examinable, HoverEventSource<V>, StyleBuilderApplicable { @Override public @NonNull HoverEvent<V> asHoverEvent() { return this; } }
HoverEvent implements Examinable, HoverEventSource<V>, StyleBuilderApplicable { @Override public @NonNull HoverEvent<V> asHoverEvent() { return this; } private  HoverEvent(final @NonNull Action<V> action, final @NonNull V value); }
HoverEvent implements Examinable, HoverEventSource<V>, StyleBuilderApplicable { @Override public @NonNull HoverEvent<V> asHoverEvent() { return this; } private  HoverEvent(final @NonNull Action<V> action, final @NonNull V value); static @NonNull HoverEvent<Component> showText(final @NonNull Component text); static @NonNull HoverEvent<ShowItem> showItem(final @NonNull Key item, final @NonNegative int count); static @NonNull HoverEvent<ShowItem> showItem(final @NonNull Key item, final @NonNegative int count, final @Nullable BinaryTagHolder nbt); static @NonNull HoverEvent<ShowItem> showItem(final @NonNull ShowItem item); static @NonNull HoverEvent<ShowEntity> showEntity(final @NonNull Key type, final @NonNull UUID id); static @NonNull HoverEvent<ShowEntity> showEntity(final @NonNull Key type, final @NonNull UUID id, final @Nullable Component name); static @NonNull HoverEvent<ShowEntity> showEntity(final @NonNull ShowEntity entity); static HoverEvent<V> hoverEvent(final @NonNull Action<V> action, final @NonNull V value); @Deprecated static HoverEvent<V> of(final @NonNull Action<V> action, final @NonNull V value); @NonNull Action<V> action(); @NonNull V value(); @NonNull HoverEvent<V> value(final @NonNull V value); HoverEvent<V> withRenderedValue(final @NonNull ComponentRenderer<C> renderer, final @NonNull C context); @Override @NonNull HoverEvent<V> asHoverEvent(); @Override @NonNull HoverEvent<V> asHoverEvent(final @NonNull UnaryOperator<V> op); @Override void styleApply(final Style.@NonNull Builder style); @Override boolean equals(final @Nullable Object other); @Override int hashCode(); @Override @NonNull Stream<? extends ExaminableProperty> examinableProperties(); @Override String toString(); }
HoverEvent implements Examinable, HoverEventSource<V>, StyleBuilderApplicable { @Override public @NonNull HoverEvent<V> asHoverEvent() { return this; } private  HoverEvent(final @NonNull Action<V> action, final @NonNull V value); static @NonNull HoverEvent<Component> showText(final @NonNull Component text); static @NonNull HoverEvent<ShowItem> showItem(final @NonNull Key item, final @NonNegative int count); static @NonNull HoverEvent<ShowItem> showItem(final @NonNull Key item, final @NonNegative int count, final @Nullable BinaryTagHolder nbt); static @NonNull HoverEvent<ShowItem> showItem(final @NonNull ShowItem item); static @NonNull HoverEvent<ShowEntity> showEntity(final @NonNull Key type, final @NonNull UUID id); static @NonNull HoverEvent<ShowEntity> showEntity(final @NonNull Key type, final @NonNull UUID id, final @Nullable Component name); static @NonNull HoverEvent<ShowEntity> showEntity(final @NonNull ShowEntity entity); static HoverEvent<V> hoverEvent(final @NonNull Action<V> action, final @NonNull V value); @Deprecated static HoverEvent<V> of(final @NonNull Action<V> action, final @NonNull V value); @NonNull Action<V> action(); @NonNull V value(); @NonNull HoverEvent<V> value(final @NonNull V value); HoverEvent<V> withRenderedValue(final @NonNull ComponentRenderer<C> renderer, final @NonNull C context); @Override @NonNull HoverEvent<V> asHoverEvent(); @Override @NonNull HoverEvent<V> asHoverEvent(final @NonNull UnaryOperator<V> op); @Override void styleApply(final Style.@NonNull Builder style); @Override boolean equals(final @Nullable Object other); @Override int hashCode(); @Override @NonNull Stream<? extends ExaminableProperty> examinableProperties(); @Override String toString();  }