diff --git a/src/main/java/net/minestom/server/inventory/AbstractInventory.java b/src/main/java/net/minestom/server/inventory/AbstractInventory.java index 9ec49f577..149b13a94 100644 --- a/src/main/java/net/minestom/server/inventory/AbstractInventory.java +++ b/src/main/java/net/minestom/server/inventory/AbstractInventory.java @@ -353,9 +353,8 @@ public abstract class AbstractInventory implements InventoryClickHandler, DataCo } } - @Nullable @Override - public Data getData() { + public @Nullable Data getData() { return data; } diff --git a/src/main/java/net/minestom/server/item/ItemStack.java b/src/main/java/net/minestom/server/item/ItemStack.java index f236f019e..72a19d244 100644 --- a/src/main/java/net/minestom/server/item/ItemStack.java +++ b/src/main/java/net/minestom/server/item/ItemStack.java @@ -131,12 +131,12 @@ public class ItemStack { } @Contract(value = "_, -> new", pure = true) - public @NotNull ItemStack withLore(@Nullable List<@NotNull Component> lore) { + public @NotNull ItemStack withLore(@NotNull List<@NotNull Component> lore) { return builder().lore(lore).build(); } @Contract(value = "_, -> new", pure = true) - public @NotNull ItemStack withLore(@NotNull UnaryOperator<@Nullable List<@NotNull Component>> loreUnaryOperator) { + public @NotNull ItemStack withLore(@NotNull UnaryOperator<@NotNull List<@NotNull Component>> loreUnaryOperator) { return withLore(loreUnaryOperator.apply(getLore())); } diff --git a/src/main/java/net/minestom/server/item/ItemStackBuilder.java b/src/main/java/net/minestom/server/item/ItemStackBuilder.java index ed8ec655d..f85a4581d 100644 --- a/src/main/java/net/minestom/server/item/ItemStackBuilder.java +++ b/src/main/java/net/minestom/server/item/ItemStackBuilder.java @@ -60,7 +60,7 @@ public class ItemStackBuilder { } @Contract(value = "_ -> this") - public @NotNull ItemStackBuilder lore(List<@NotNull Component> lore) { + public @NotNull ItemStackBuilder lore(@NotNull List<@NotNull Component> lore) { this.metaBuilder.lore(lore); return this; }