Add comment to signal how to make a "null" ItemStack

This commit is contained in:
themode 2020-10-31 01:41:46 +01:00
parent f328a9cb2b
commit 4375a8734d

View File

@ -28,6 +28,8 @@ import java.util.*;
/**
* Represents an item in an inventory ({@link PlayerInventory}, {@link Inventory}) or on the ground ({@link ItemEntity}).
* <p>
* An item stack cannot be null, you can however use {@link #getAirItem()} instead.
* <p>
* 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}.
* <p>
* Used when you require a "null item".
*
* @return an air item
*/