From 4375a8734d6c76f205575b4dc1a9c5e1c53aa0af Mon Sep 17 00:00:00 2001 From: themode Date: Sat, 31 Oct 2020 01:41:46 +0100 Subject: [PATCH] Add comment to signal how to make a "null" ItemStack --- src/main/java/net/minestom/server/item/ItemStack.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/minestom/server/item/ItemStack.java b/src/main/java/net/minestom/server/item/ItemStack.java index 8ef3ad5d5..c11dae8bc 100644 --- a/src/main/java/net/minestom/server/item/ItemStack.java +++ b/src/main/java/net/minestom/server/item/ItemStack.java @@ -28,6 +28,8 @@ import java.util.*; /** * Represents an item in an inventory ({@link PlayerInventory}, {@link Inventory}) or on the ground ({@link ItemEntity}). *

+ * An item stack cannot be null, you can however use {@link #getAirItem()} instead. + *

* WARNING: all setters will not update the item automatically, it will need to be refreshed manually. * Here a non-exhaustive list of what you can do to update the item: * {@link PlayerInventory#refreshSlot(short)}, {@link Inventory#refreshSlot(short)} or a raw {@link SetSlotPacket}. @@ -82,8 +84,9 @@ public class ItemStack implements DataContainer { } /** - * o * Gets a new {@link ItemStack} with the material sets to {@link Material#AIR}. + *

+ * Used when you require a "null item". * * @return an air item */