From 52e676889aea9f70286c59c6f0a4d5f06b6516b4 Mon Sep 17 00:00:00 2001 From: zml Date: Tue, 23 Apr 2024 21:13:46 -0700 Subject: [PATCH] minor fixes from self-review --- .../text/event/DataComponentValueConverterRegistry.java | 2 +- .../java/net/kyori/adventure/text/event/HoverEvent.java | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/src/main/java/net/kyori/adventure/text/event/DataComponentValueConverterRegistry.java b/api/src/main/java/net/kyori/adventure/text/event/DataComponentValueConverterRegistry.java index 0372e9626..0bfaf9cae 100644 --- a/api/src/main/java/net/kyori/adventure/text/event/DataComponentValueConverterRegistry.java +++ b/api/src/main/java/net/kyori/adventure/text/event/DataComponentValueConverterRegistry.java @@ -46,7 +46,7 @@ /** * A registry for conversions between different data component value holder classes. * - *

Conversions are discovered by {@link ServiceLoader} lookup of implementations of the {@link Provider} interface (using the loading thread's context classloader).

+ *

Conversions are discovered by {@link ServiceLoader} lookup of implementations of the {@link Provider} interface (on the classloader which loaded Adventure).

* * @since 4.17.0 */ diff --git a/api/src/main/java/net/kyori/adventure/text/event/HoverEvent.java b/api/src/main/java/net/kyori/adventure/text/event/HoverEvent.java index 7a980896e..e18291355 100644 --- a/api/src/main/java/net/kyori/adventure/text/event/HoverEvent.java +++ b/api/src/main/java/net/kyori/adventure/text/event/HoverEvent.java @@ -143,7 +143,7 @@ public final class HoverEvent implements Examinable, HoverEventSource, Sty * @return a hover event * @since 4.17.0 */ - public static @NotNull HoverEvent showItem(final @NotNull Keyed item, final @Range(from = 0, to = Integer.MAX_VALUE) int count, final @NotNull Map dataComponents) { + public static @NotNull HoverEvent showItem(final @NotNull Keyed item, final @Range(from = 0, to = Integer.MAX_VALUE) int count, final @NotNull Map dataComponents) { return showItem(ShowItem.showItem(item, count, dataComponents)); } @@ -491,11 +491,11 @@ public static final class ShowItem implements Examinable { * @since 4.17.0 * @sinceMinecraft 1.20.5 */ - public static @NotNull ShowItem showItem(final @NotNull Keyed item, final @Range(from = 0, to = Integer.MAX_VALUE) int count, final @NotNull Map dataComponents) { + public static @NotNull ShowItem showItem(final @NotNull Keyed item, final @Range(from = 0, to = Integer.MAX_VALUE) int count, final @NotNull Map dataComponents) { return new ShowItem(requireNonNull(item, "item").key(), count, null, dataComponents); } - private ShowItem(final @NotNull Key item, final @Range(from = 0, to = Integer.MAX_VALUE) int count, final @Nullable BinaryTagHolder nbt, final @NotNull Map dataComponents) { + private ShowItem(final @NotNull Key item, final @Range(from = 0, to = Integer.MAX_VALUE) int count, final @Nullable BinaryTagHolder nbt, final @NotNull Map dataComponents) { this.item = item; this.count = count; this.nbt = nbt; @@ -592,7 +592,7 @@ private ShowItem(final @NotNull Key item, final @Range(from = 0, to = Integer.MA /** * Set the data components used on this item. * - *

This will clear any legacy nbt-format data on the item.

+ *

This will clear any legacy NBT-format data on the item.

* * @param holder the new data components to set * @return a show item data object that has the provided components