# Uses of Class
org.bukkit.inventory.ItemStack

Packages that use ItemStack
Package
Description
com.destroystokyo.paper
com.destroystokyo.paper.event.entity
com.destroystokyo.paper.event.inventory
com.destroystokyo.paper.event.player
com.destroystokyo.paper.inventory
io.papermc.paper.advancement
io.papermc.paper.entity
io.papermc.paper.event.block
io.papermc.paper.event.entity
io.papermc.paper.event.player
io.papermc.paper.potion
org.bukkit
The root package of the Bukkit API, contains generalized API classes.
org.bukkit.advancement
Classes relevant to advancements.
org.bukkit.block
Classes used to manipulate the voxels in a `world`, including special states.
org.bukkit.block.data
Generalized BlockData classes.
org.bukkit.configuration
Classes dedicated to handling a plugin's runtime configuration.
org.bukkit.enchantments
Classes relating to the specialized enhancements to `item stacks`, as part of the `meta data`.
org.bukkit.entity
Interfaces for non-voxel objects that can exist in a `world`, including all players, monsters, projectiles, etc.
org.bukkit.event.block
`Events` relating to when a `block` is changed or interacts with the `world`.
org.bukkit.event.enchantment
`Events` triggered from an `enchantment table`.
org.bukkit.event.entity
`Events` relating to `entities`, excluding some directly referencing some more specific entity types.
org.bukkit.event.hanging
`Events` relating to `entities that hang`.
org.bukkit.event.inventory
`Events` relating to `inventory` manipulation.
org.bukkit.event.player
`Events` relating to `players`.
org.bukkit.event.world
`Events` triggered by various `world` states or changes.
org.bukkit.inventory
Classes involved in manipulating player inventories and item interactions.
org.bukkit.inventory.meta
The interfaces used when manipulating extra data can can be stored inside `item stacks`.
org.bukkit.loot
Classes relevant to loot table manipulation and generation.
org.bukkit.material
Classes that represents various voxel types and states.
org.bukkit.potion
Classes to represent various `potion` properties and manipulation.

## Uses of ItemStack in com.destroystokyo.paper

Methods in com.destroystokyo.paper with parameters of type ItemStack
Modifier and Type
Method
Description
`boolean`
MaterialSetTag.`isTagged(@NotNull ItemStack item)`

## Uses of ItemStack in com.destroystokyo.paper.event.entity

Methods in com.destroystokyo.paper.event.entity that return ItemStack
Modifier and Type
Method
Description
`@Nullable ItemStack`
WitchConsumePotionEvent.`getPotion()`
`@Nullable ItemStack`
WitchReadyPotionEvent.`getPotion()`
`@Nullable ItemStack`
WitchThrowPotionEvent.`getPotion()`
`static @Nullable ItemStack`
WitchReadyPotionEvent.`process(@NotNull Witch witch, @Nullable ItemStack potion)`
Fires thee event, returning the desired potion, or air of cancelled
Methods in com.destroystokyo.paper.event.entity with parameters of type ItemStack
Modifier and Type
Method
Description
`static @Nullable ItemStack`
WitchReadyPotionEvent.`process(@NotNull Witch witch, @Nullable ItemStack potion)`
Fires thee event, returning the desired potion, or air of cancelled
`void`
WitchConsumePotionEvent.`setPotion(@Nullable ItemStack potion)`
Sets the potion to be consumed and applied to the witch.
`void`
WitchReadyPotionEvent.`setPotion(@Nullable ItemStack potion)`
Sets the potion the which is going to hold and use
`void`
WitchThrowPotionEvent.`setPotion(@Nullable ItemStack potion)`
Sets the potion to be thrown at a player
Constructors in com.destroystokyo.paper.event.entity with parameters of type ItemStack
Modifier
Constructor
Description
``
`WitchConsumePotionEvent(@NotNull Witch witch, @Nullable ItemStack potion)`
``
`WitchReadyPotionEvent(@NotNull Witch witch, @Nullable ItemStack potion)`
``
`WitchThrowPotionEvent(@NotNull Witch witch, @NotNull LivingEntity target, @Nullable ItemStack potion)`

## Uses of ItemStack in com.destroystokyo.paper.event.inventory

Methods in com.destroystokyo.paper.event.inventory that return ItemStack
Modifier and Type
Method
Description
`@Nullable ItemStack`
PrepareResultEvent.`getResult()`
Get result item, may be null.
Methods in com.destroystokyo.paper.event.inventory with parameters of type ItemStack
Modifier and Type
Method
Description
`void`
PrepareResultEvent.`setResult(@Nullable ItemStack result)`
Constructors in com.destroystokyo.paper.event.inventory with parameters of type ItemStack
Modifier
Constructor
Description
``
`PrepareGrindstoneEvent(@NotNull InventoryView inventory, @Nullable ItemStack result)`
Deprecated.
``
`PrepareResultEvent(@NotNull InventoryView inventory, @Nullable ItemStack result)`

## Uses of ItemStack in com.destroystokyo.paper.event.player

Methods in com.destroystokyo.paper.event.player that return ItemStack
Modifier and Type
Method
Description
`@NotNull ItemStack`
PlayerReadyArrowEvent.`getArrow()`
`@NotNull ItemStack`
PlayerReadyArrowEvent.`getBow()`
`@NotNull ItemStack`
PlayerElytraBoostEvent.`getItemStack()`
Get the firework itemstack used
`@NotNull ItemStack`
PlayerLaunchProjectileEvent.`getItemStack()`
Get the ItemStack used to fire the projectile
`@Nullable ItemStack`
PlayerArmorChangeEvent.`getNewItem()`
Gets the new item that's replacing the old
`@Nullable ItemStack`
PlayerArmorChangeEvent.`getOldItem()`
Gets the existing item that's being replaced
Constructors in com.destroystokyo.paper.event.player with parameters of type ItemStack
Modifier
Constructor
Description
``
`PlayerArmorChangeEvent(@NotNull Player player, @NotNull PlayerArmorChangeEvent.SlotType slotType, @Nullable ItemStack oldItem, @Nullable ItemStack newItem)`
``
`PlayerElytraBoostEvent(@NotNull Player player, @NotNull ItemStack itemStack, @NotNull Firework firework)`
``
`PlayerLaunchProjectileEvent(@NotNull Player shooter, @NotNull ItemStack itemStack, @NotNull Projectile projectile)`
``
`PlayerReadyArrowEvent(@NotNull Player player, @NotNull ItemStack bow, @NotNull ItemStack arrow)`

## Uses of ItemStack in com.destroystokyo.paper.inventory

Fields in com.destroystokyo.paper.inventory with type parameters of type ItemStack
Modifier and Type
Field
Description
`protected final List<ItemStack>`
ItemStackRecipeChoice.`choices`
Deprecated.
Methods in com.destroystokyo.paper.inventory that return ItemStack
Modifier and Type
Method
Description
`ItemStack`
ItemStackRecipeChoice.`getItemStack()`
Deprecated.
Methods in com.destroystokyo.paper.inventory with parameters of type ItemStack
Modifier and Type
Method
Description
`boolean`
ItemStackRecipeChoice.`test(ItemStack itemStack)`
Deprecated.
Constructors in com.destroystokyo.paper.inventory with parameters of type ItemStack
Modifier
Constructor
Description
``
`ItemStackRecipeChoice(ItemStack choices)`
Deprecated.
Constructor parameters in com.destroystokyo.paper.inventory with type arguments of type ItemStack
Modifier
Constructor
Description
``
`ItemStackRecipeChoice(List<ItemStack> choices)`
Deprecated.

## Uses of ItemStack in io.papermc.paper.advancement

Methods in io.papermc.paper.advancement that return ItemStack
Modifier and Type
Method
Description
`@NotNull ItemStack`
AdvancementDisplay.`icon()`
Gets the icon shown in the frame in the advancements screen.

## Uses of ItemStack in io.papermc.paper.entity

Methods in io.papermc.paper.entity that return ItemStack
Modifier and Type
Method
Description
`@NotNull ItemStack`
Bucketable.`getBaseBucketItem()`
Gets the base itemstack of this entity in a bucket form.

## Uses of ItemStack in io.papermc.paper.event.block

Methods in io.papermc.paper.event.block that return ItemStack
Modifier and Type
Method
Description
`@NotNull ItemStack`
PlayerShearBlockEvent.`getItem()`
Gets the item used to shear the block.
`@NotNull ItemStack`
BlockPreDispenseEvent.`getItemStack()`
Gets the `ItemStack` to be dispensed.
Methods in io.papermc.paper.event.block that return types with arguments of type ItemStack
Modifier and Type
Method
Description
`@NotNull List<ItemStack>`
BlockBreakBlockEvent.`getDrops()`
Get the drops of this event
`@NotNull List<ItemStack>`
PlayerShearBlockEvent.`getDrops()`
Gets the resulting drops of this event.
Constructors in io.papermc.paper.event.block with parameters of type ItemStack
Modifier
Constructor
Description
``
`BlockPreDispenseEvent(@NotNull Block block, @NotNull ItemStack itemStack, int slot)`
``
`PlayerShearBlockEvent(@NotNull Player who, @NotNull Block block, @NotNull ItemStack item, @NotNull EquipmentSlot hand, @NotNull List<ItemStack> drops)`
Constructor parameters in io.papermc.paper.event.block with type arguments of type ItemStack
Modifier
Constructor
Description
``
`BlockBreakBlockEvent(@NotNull Block block, @NotNull Block source, @NotNull List<ItemStack> drops)`
``
`PlayerShearBlockEvent(@NotNull Player who, @NotNull Block block, @NotNull ItemStack item, @NotNull EquipmentSlot hand, @NotNull List<ItemStack> drops)`

## Uses of ItemStack in io.papermc.paper.event.entity

Methods in io.papermc.paper.event.entity that return ItemStack
Modifier and Type
Method
Description
`@Nullable ItemStack`
EntityLoadCrossbowEvent.`getCrossbow()`
Gets the crossbow `ItemStack` being loaded.
`@NotNull ItemStack`
EntityDamageItemEvent.`getItem()`
Gets the item being damaged.
Constructors in io.papermc.paper.event.entity with parameters of type ItemStack
Modifier
Constructor
Description
``
`EntityDamageItemEvent(@NotNull Entity entity, @NotNull ItemStack item, int damage)`
``
`EntityLoadCrossbowEvent(@NotNull LivingEntity entity, @Nullable ItemStack crossbow, @NotNull EquipmentSlot hand)`

## Uses of ItemStack in io.papermc.paper.event.player

Methods in io.papermc.paper.event.player that return ItemStack
Modifier and Type
Method
Description
`@NotNull ItemStack`
PlayerLecternPageChangeEvent.`getBook()`
Gets the current ItemStack on the lectern.
`@NotNull ItemStack`
PlayerFlowerPotManipulateEvent.`getItem()`
Gets the item being placed, or taken from, the flower pot.
`@NotNull ItemStack`
PlayerStopUsingItemEvent.`getItem()`
Gets the exact item the player is releasing
`@NotNull ItemStack`
PlayerItemFrameChangeEvent.`getItemStack()`
Gets the `ItemStack` involved in this event.
`@NotNull ItemStack`
PlayerInventorySlotChangeEvent.`getNewItemStack()`
Clone of ItemStack that is in the slot after the change.
`@NotNull ItemStack`
PlayerInventorySlotChangeEvent.`getOldItemStack()`
Clone of ItemStack that was in the slot before the change.
Methods in io.papermc.paper.event.player with parameters of type ItemStack
Modifier and Type
Method
Description
`void`
PlayerItemFrameChangeEvent.`setItemStack(@Nullable ItemStack itemStack)`
Sets the `ItemStack` that this `ItemFrame` holds.
Constructors in io.papermc.paper.event.player with parameters of type ItemStack
Modifier
Constructor
Description
``
`PlayerFlowerPotManipulateEvent(@NotNull Player player, @NotNull Block flowerpot, @NotNull ItemStack item, boolean placing)`
``
`PlayerInventorySlotChangeEvent(@NotNull Player player, int rawSlot, @NotNull ItemStack oldItemStack, @NotNull ItemStack newItemStack)`
``
`PlayerItemFrameChangeEvent(@NotNull Player player, @NotNull ItemFrame itemFrame, @NotNull ItemStack itemStack, @NotNull PlayerItemFrameChangeEvent.ItemFrameChangeAction action)`
``
`PlayerLecternPageChangeEvent(@NotNull Player player, @NotNull Lectern lectern, @NotNull ItemStack book, @NotNull PlayerLecternPageChangeEvent.PageChangeDirection pageChangeDirection, int oldPage, int newPage)`
``
`PlayerStopUsingItemEvent(@NotNull Player player, @NotNull ItemStack item, int ticksHeldFor)`

## Uses of ItemStack in io.papermc.paper.potion

Methods in io.papermc.paper.potion that return ItemStack
Modifier and Type
Method
Description
`@NotNull ItemStack`
PotionMix.`getResult()`
Gets the resulting itemstack after the brew has finished.
Constructors in io.papermc.paper.potion with parameters of type ItemStack
Modifier
Constructor
Description
``
`PotionMix(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, @NotNull RecipeChoice ingredient)`
Creates a new potion mix.

## Uses of ItemStack in org.bukkit

Methods in org.bukkit that return ItemStack
Modifier and Type
Method
Description
`static @NotNull ItemStack`
Bukkit.`craftItem(@NotNull ItemStack[] craftingMatrix, @NotNull World world, @NotNull Player player)`
Get the crafted item using the list of `ItemStack` provided.
`@NotNull ItemStack`
Server.`craftItem(@NotNull ItemStack[] craftingMatrix, @NotNull World world, @NotNull Player player)`
Get the crafted item using the list of `ItemStack` provided.
`static @NotNull ItemStack`
Bukkit.`createExplorerMap(@NotNull World world, @NotNull Location location, @NotNull StructureType structureType)`
Create a new explorer map targeting the closest nearby structure of a given `StructureType`.
`static @NotNull ItemStack`
Bukkit.`createExplorerMap(@NotNull World world, @NotNull Location location, @NotNull StructureType structureType, int radius, boolean findUnexplored)`
Create a new explorer map targeting the closest nearby structure of a given `StructureType`.
`@NotNull ItemStack`
Server.`createExplorerMap(@NotNull World world, @NotNull Location location, @NotNull StructureType structureType)`
Create a new explorer map targeting the closest nearby structure of a given `StructureType`.
`@NotNull ItemStack`
Server.`createExplorerMap(@NotNull World world, @NotNull Location location, @NotNull StructureType structureType, int radius, boolean findUnexplored)`
Create a new explorer map targeting the closest nearby structure of a given `StructureType`.
`ItemStack`
UnsafeValues.`deserializeItem(byte[] data)`
Deprecated.
`ItemStack`
UnsafeValues.`modifyItemStack(ItemStack stack, String arguments)`
Deprecated.
Methods in org.bukkit with parameters of type ItemStack
Modifier and Type
Method
Description
`static @NotNull ItemStack`
Bukkit.`craftItem(@NotNull ItemStack[] craftingMatrix, @NotNull World world, @NotNull Player player)`
Get the crafted item using the list of `ItemStack` provided.
`@NotNull ItemStack`
Server.`craftItem(@NotNull ItemStack[] craftingMatrix, @NotNull World world, @NotNull Player player)`
Get the crafted item using the list of `ItemStack` provided.
`@NotNull Item`
World.`dropItem(@NotNull Location location, @NotNull ItemStack item)`
Drops an item at the specified `Location`
`@NotNull Item`
World.`dropItem(@NotNull Location location, @NotNull ItemStack item, @Nullable Consumer<Item> function)`
Drops an item at the specified `Location` Note that functions will run before the entity is spawned
`@NotNull Item`
World.`dropItemNaturally(@NotNull Location location, @NotNull ItemStack item)`
Drops an item at the specified `Location` with a random offset
`@NotNull Item`
World.`dropItemNaturally(@NotNull Location location, @NotNull ItemStack item, @Nullable Consumer<Item> function)`
Drops an item at the specified `Location` with a random offset Note that functions will run before the entity is spawned
`static @Nullable Recipe`
Bukkit.`getCraftingRecipe(@NotNull ItemStack[] craftingMatrix, @NotNull World world)`
Get the `Recipe` for the list of ItemStacks provided.
`@Nullable Recipe`
Server.`getCraftingRecipe(@NotNull ItemStack[] craftingMatrix, @NotNull World world)`
Get the `Recipe` for the list of ItemStacks provided.
`ItemRarity`
UnsafeValues.`getItemStackRarity(ItemStack itemStack)`
Deprecated.
Gets the item rarity of the itemstack.
`static @NotNull List<Recipe>`
Bukkit.`getRecipesFor(@NotNull ItemStack result)`
Get a list of all recipes for a given item.
`@NotNull List<Recipe>`
Server.`getRecipesFor(@NotNull ItemStack result)`
Get a list of all recipes for a given item.
`String`
UnsafeValues.`getTranslationKey(ItemStack itemStack)`
Deprecated.
Return the translation key for the ItemStack, so the client can translate it into the active locale when using a `TranslatableComponent`.
`boolean`
UnsafeValues.`isValidRepairItemStack(@NotNull ItemStack itemToBeRepaired, @NotNull ItemStack repairMaterial)`
Deprecated.
Checks if an itemstack can be repaired with another itemstack.
`ItemStack`
UnsafeValues.`modifyItemStack(ItemStack stack, String arguments)`
Deprecated.
`byte[]`
UnsafeValues.`serializeItem(ItemStack item)`
Deprecated.

## Uses of ItemStack in org.bukkit.advancement

Methods in org.bukkit.advancement that return ItemStack
Modifier and Type
Method
Description
`@NotNull ItemStack`
AdvancementDisplay.`getIcon()`
Deprecated, for removal: This API element is subject to removal in a future version.
The icon that is used for this advancement.

## Uses of ItemStack in org.bukkit.block

Methods in org.bukkit.block that return ItemStack
Modifier and Type
Method
Description
`@Nullable ItemStack`
Campfire.`getItem(int index)`
`@NotNull ItemStack`
Jukebox.`getRecord()`
Gets the record item inserted into the jukebox.
Methods in org.bukkit.block that return types with arguments of type ItemStack
Modifier and Type
Method
Description
`@NotNull Collection<ItemStack>`
Block.`getDrops()`
Returns a list of items which would drop by destroying this block
`@NotNull Collection<ItemStack>`
Block.`getDrops(@NotNull ItemStack tool, @Nullable Entity entity)`
Returns a list of items which would drop by the entity destroying this block with a specific tool
`@NotNull Collection<ItemStack>`
Block.`getDrops(@Nullable ItemStack tool)`
Returns a list of items which would drop by destroying this block with a specific tool
`@Unmodifiable Collection<ItemStack>`
BlockState.`getDrops()`
Returns an immutable list of items which would drop by destroying this block state.
`@Unmodifiable Collection<ItemStack>`
BlockState.`getDrops(ItemStack tool)`
Returns an immutable list of items which would drop by destroying this block state with a specific tool
`@Unmodifiable Collection<ItemStack>`
BlockState.`getDrops(ItemStack tool, Entity entity)`
Returns an immutable list of items which would drop by the entity destroying this block state with a specific tool
Methods in org.bukkit.block with parameters of type ItemStack
Modifier and Type
Method
Description
`boolean`
Block.`breakNaturally(@NotNull ItemStack tool, boolean triggerEffect)`
Breaks the block and spawns item drops as if a player had broken it with a specific tool
`boolean`
Block.`breakNaturally(@Nullable ItemStack tool)`
Breaks the block and spawns items as if a player had digged it with a specific tool
`default @org.jetbrains.annotations.NotNull float`
Block.`getDestroySpeed(@NotNull ItemStack itemStack)`
Gets the speed at which this block will be destroyed by a given `ItemStack`
`@org.jetbrains.annotations.NotNull float`
Block.`getDestroySpeed(@NotNull ItemStack itemStack, boolean considerEnchants)`
Gets the speed at which this blook will be destroyed by a given `ItemStack`
`@NotNull Collection<ItemStack>`
Block.`getDrops(@NotNull ItemStack tool, @Nullable Entity entity)`
Returns a list of items which would drop by the entity destroying this block with a specific tool
`@NotNull Collection<ItemStack>`
Block.`getDrops(@Nullable ItemStack tool)`
Returns a list of items which would drop by destroying this block with a specific tool
`@Unmodifiable Collection<ItemStack>`
BlockState.`getDrops(ItemStack tool)`
Returns an immutable list of items which would drop by destroying this block state with a specific tool
`@Unmodifiable Collection<ItemStack>`
BlockState.`getDrops(ItemStack tool, Entity entity)`
Returns an immutable list of items which would drop by the entity destroying this block state with a specific tool
`boolean`
Block.`isPreferredTool(@NotNull ItemStack tool)`
Returns if the given item is a preferred choice to break this Block.
`boolean`
Block.`isValidTool(@NotNull ItemStack itemStack)`
Checks if the itemstack is a valid tool to break the block with
`void`
Campfire.`setItem(int index, @Nullable ItemStack item)`
`void`
Jukebox.`setRecord(@Nullable ItemStack record)`
Sets the record being played.
`void`
CreatureSpawner.`setSpawnedItem(ItemStack itemStack)`
Sets the `EntityType` to `EntityType.DROPPED_ITEM` and sets the data to the given `ItemStack`.

## Uses of ItemStack in org.bukkit.block.data

Methods in org.bukkit.block.data with parameters of type ItemStack
Modifier and Type
Method
Description
`boolean`
BlockData.`isPreferredTool(ItemStack tool)`
Returns if the given item is a preferred choice to break this block.

## Uses of ItemStack in org.bukkit.configuration

Methods in org.bukkit.configuration that return ItemStack
Modifier and Type
Method
Description
`@Nullable ItemStack`
ConfigurationSection.`getItemStack(@NotNull String path)`
Gets the requested ItemStack by path.
`@Nullable ItemStack`
ConfigurationSection.`getItemStack(@NotNull String path, @Nullable ItemStack def)`
Gets the requested `ItemStack` by path, returning a default value if not found.
`@Nullable ItemStack`
MemorySection.`getItemStack(@NotNull String path)`
`@Nullable ItemStack`
MemorySection.`getItemStack(@NotNull String path, @Nullable ItemStack def)`
Methods in org.bukkit.configuration with parameters of type ItemStack
Modifier and Type
Method
Description
`@Nullable ItemStack`
ConfigurationSection.`getItemStack(@NotNull String path, @Nullable ItemStack def)`
Gets the requested `ItemStack` by path, returning a default value if not found.
`@Nullable ItemStack`
MemorySection.`getItemStack(@NotNull String path, @Nullable ItemStack def)`

## Uses of ItemStack in org.bukkit.enchantments

Methods in org.bukkit.enchantments with parameters of type ItemStack
Modifier and Type
Method
Description
`abstract boolean`
Enchantment.`canEnchantItem(@NotNull ItemStack item)`
Checks if this Enchantment may be applied to the given `ItemStack`.
`boolean`
EnchantmentWrapper.`canEnchantItem(@NotNull ItemStack item)`
`boolean`
EnchantmentTarget.`includes(@NotNull ItemStack item)`
Check whether this target includes the specified item.

## Uses of ItemStack in org.bukkit.entity

Methods in org.bukkit.entity that return ItemStack
Modifier and Type
Method
Description
`@NotNull ItemStack`
LivingEntity.`damageItemStack(@NotNull ItemStack stack, int amount)`
Damages this itemstack by the specified amount.
`ItemStack`
LivingEntity.`getActiveItem()`
Get's the item being actively "used" or consumed.
`@NotNull ItemStack`
ArmorStand.`getBoots()`
Deprecated.
prefer `EntityEquipment.getBoots()`
`@NotNull ItemStack`
ArmorStand.`getChestplate()`
Deprecated.
prefer `EntityEquipment.getChestplate()`
`@NotNull ItemStack`
SizedFireball.`getDisplayItem()`
Gets the display `ItemStack`.
`@Nullable ItemStack`
Witch.`getDrinkingPotion()`
Get the potion the Witch is drinking
`@NotNull ItemStack`
ArmorStand.`getHelmet()`
Deprecated.
prefer `EntityEquipment.getHelmet()`
`@NotNull ItemStack`
ArmorStand.`getItem(EquipmentSlot slot)`
Returns the item the armor stand has equip in the given equipment slot
`@NotNull ItemStack`
EnderSignal.`getItem()`
Get the `ItemStack` to be displayed while in the air and to be dropped on death.
`ItemStack`
Firework.`getItem()`
Gets the item used in the firework.
`@NotNull ItemStack`
ItemFrame.`getItem()`
Get the item in this frame
`@NotNull ItemStack`
ThrowableProjectile.`getItem()`
Gets the ItemStack the thrown projectile will display.
`@NotNull ItemStack`
ThrownPotion.`getItem()`
Returns a copy of the ItemStack for this thrown potion.
`@NotNull ItemStack`
ArmorStand.`getItemInHand()`
Deprecated.
prefer `ArmorStand.getItem(EquipmentSlot)` // Paper
`@NotNull ItemStack`
HumanEntity.`getItemInHand()`
Deprecated.
Humans may now dual wield in their off hand, use explicit methods in `PlayerInventory`.
`@Nullable ItemStack`
HumanEntity.`getItemInUse()`
Deprecated.
Deprecated in favor of `LivingEntity.getActiveItem()`
`@NotNull ItemStack`
HumanEntity.`getItemOnCursor()`
Returns the ItemStack currently on your cursor, can be empty.
`ItemStack`
AbstractArrow.`getItemStack()`
Gets the ItemStack for this arrow.
`@NotNull ItemStack`
Item.`getItemStack()`
Gets the item stack associated with this item drop.
`@NotNull ItemStack`
ArmorStand.`getLeggings()`
Deprecated.
prefer `EntityEquipment.getLeggings()`
Methods in org.bukkit.entity with parameters of type ItemStack
Modifier and Type
Method
Description
`@Nullable Firework`
Player.`boostElytra(@NotNull ItemStack firework)`
Boost a Player that's `LivingEntity.isGliding()` using a `Firework`.
`@NotNull ItemStack`
LivingEntity.`damageItemStack(@NotNull ItemStack stack, int amount)`
Damages this itemstack by the specified amount.
`@Nullable Firework`
HumanEntity.`fireworkBoost(@NotNull ItemStack fireworkItemStack)`
Perform a firework boost.
`@NotNull Sound`
LivingEntity.`getDrinkingSound(@NotNull ItemStack itemStack)`
Get the `Sound` this entity will make when drinking the given `ItemStack`.
`@NotNull Sound`
LivingEntity.`getEatingSound(@NotNull ItemStack itemStack)`
Get the `Sound` this entity will make when eating the given `ItemStack`.
`boolean`
Animals.`isBreedItem(@NotNull ItemStack stack)`
Check if the provided ItemStack is the correct item used for breeding this entity.
`void`
Player.`openBook(@NotNull ItemStack book)`
Open a `Material.WRITTEN_BOOK` for a Player
`void`
Player.`sendEquipmentChange(@NotNull LivingEntity entity, @NotNull EquipmentSlot slot, @NotNull ItemStack item)`
Send the equipment change of an entity.
`void`
ArmorStand.`setBoots(@Nullable ItemStack item)`
Deprecated.
prefer `EntityEquipment.setBoots(org.bukkit.inventory.ItemStack)`
`void`
ArmorStand.`setChestplate(@Nullable ItemStack item)`
Deprecated.
prefer `EntityEquipment.setChestplate(org.bukkit.inventory.ItemStack)`
`void`
SizedFireball.`setDisplayItem(@NotNull ItemStack item)`
Sets the display `ItemStack` for the fireball.
`void`
Witch.`setDrinkingPotion(@Nullable ItemStack potion)`
Set the potion the Witch should drink
`void`
ArmorStand.`setHelmet(@Nullable ItemStack item)`
Deprecated.
prefer `EntityEquipment.setHelmet(org.bukkit.inventory.ItemStack)`
`void`
ArmorStand.`setItem(EquipmentSlot slot, @Nullable ItemStack item)`
Sets the item the armor stand has equip in the given equipment slot
`void`
EnderSignal.`setItem(@Nullable ItemStack item)`
Set the `ItemStack` to be displayed while in the air and to be dropped on death.
`void`
Firework.`setItem(ItemStack itemStack)`
Sets the item used in the firework.
`void`
ItemFrame.`setItem(@Nullable ItemStack item)`
Set the item in this frame
`void`
ItemFrame.`setItem(@Nullable ItemStack item, boolean playSound)`
Set the item in this frame
`void`
ThrowableProjectile.`setItem(@NotNull ItemStack item)`
Sets the display ItemStack for the thrown projectile.
`void`
ThrownPotion.`setItem(@NotNull ItemStack item)`
Set the ItemStack for this thrown potion.
`void`
ArmorStand.`setItemInHand(@Nullable ItemStack item)`
Deprecated.
prefer `ArmorStand.setItem(EquipmentSlot, ItemStack)` // Paper
`void`
HumanEntity.`setItemInHand(@Nullable ItemStack item)`
Deprecated.
Humans may now dual wield in their off hand, use explicit methods in `PlayerInventory`.
`void`
HumanEntity.`setItemOnCursor(@Nullable ItemStack item)`
Sets the item to the given ItemStack, this will replace whatever the user was moving.
`void`
Item.`setItemStack(@NotNull ItemStack stack)`
Sets the item stack associated with this item drop.
`void`
ArmorStand.`setLeggings(@Nullable ItemStack item)`
Deprecated.
prefer `EntityEquipment.setLeggings(org.bukkit.inventory.ItemStack)`

## Uses of ItemStack in org.bukkit.event.block

Fields in org.bukkit.event.block declared as ItemStack
Modifier and Type
Field
Description
`protected ItemStack`
BlockPlaceEvent.`itemInHand`
Methods in org.bukkit.event.block that return ItemStack
Modifier and Type
Method
Description
`@NotNull ItemStack`
BlockDispenseEvent.`getItem()`
Gets the item that is being dispensed.
`@NotNull ItemStack`
BlockDamageAbortEvent.`getItemInHand()`
Gets the ItemStack for the item currently in the player's hand.
`@NotNull ItemStack`
BlockDamageEvent.`getItemInHand()`
Gets the ItemStack for the item currently in the player's hand.
`@NotNull ItemStack`
BlockPlaceEvent.`getItemInHand()`
Gets the item in the player's hand when they placed the block.
`@NotNull ItemStack`
BlockCookEvent.`getResult()`
Gets the resultant ItemStack for this event
`@NotNull ItemStack`
BlockCookEvent.`getSource()`
Gets the smelted ItemStack for this event
`@NotNull ItemStack`
BlockShearEntityEvent.`getTool()`
Gets the item used to shear this sheep.
Methods in org.bukkit.event.block with parameters of type ItemStack
Modifier and Type
Method
Description
`void`
BlockDispenseEvent.`setItem(@NotNull ItemStack item)`
Sets the item being dispensed.
`void`
BlockCookEvent.`setResult(@NotNull ItemStack result)`
Sets the resultant ItemStack for this event
Constructors in org.bukkit.event.block with parameters of type ItemStack
Modifier
Constructor
Description
``
`BlockCookEvent(@NotNull Block block, @NotNull ItemStack source, @NotNull ItemStack result)`
Deprecated.
``
`BlockCookEvent(@NotNull Block block, @NotNull ItemStack source, @NotNull ItemStack result, CookingRecipe<?> recipe)`
``
`BlockDamageAbortEvent(@NotNull Player player, @NotNull Block block, @NotNull ItemStack itemInHand)`
``
`BlockDamageEvent(@NotNull Player player, @NotNull Block block, @NotNull ItemStack itemInHand, boolean instaBreak)`
``
`BlockDispenseArmorEvent(@NotNull Block block, @NotNull ItemStack dispensed, @NotNull LivingEntity target)`
``
`BlockDispenseEvent(@NotNull Block block, @NotNull ItemStack dispensed, @NotNull Vector velocity)`
``
`BlockMultiPlaceEvent(@NotNull List<BlockState> states, @NotNull Block clicked, @NotNull ItemStack itemInHand, @NotNull Player thePlayer, boolean canBuild)`
Deprecated.
``
`BlockMultiPlaceEvent(@NotNull List<BlockState> states, @NotNull Block clicked, @NotNull ItemStack itemInHand, @NotNull Player thePlayer, boolean canBuild, EquipmentSlot hand)`
``
`BlockPlaceEvent(@NotNull Block placedBlock, @NotNull BlockState replacedBlockState, @NotNull Block placedAgainst, @NotNull ItemStack itemInHand, @NotNull Player thePlayer, boolean canBuild)`
Deprecated.
``
`BlockPlaceEvent(@NotNull Block placedBlock, @NotNull BlockState replacedBlockState, @NotNull Block placedAgainst, @NotNull ItemStack itemInHand, @NotNull Player thePlayer, boolean canBuild, @NotNull EquipmentSlot hand)`
``
`BlockShearEntityEvent(@NotNull Block dispenser, @NotNull Entity sheared, @NotNull ItemStack tool)`

## Uses of ItemStack in org.bukkit.event.enchantment

Methods in org.bukkit.event.enchantment that return ItemStack
Modifier and Type
Method
Description
`@NotNull ItemStack`
EnchantItemEvent.`getItem()`
Gets the item to be enchanted (can be modified)
`@NotNull ItemStack`
PrepareItemEnchantEvent.`getItem()`
Gets the item to be enchanted.
Constructors in org.bukkit.event.enchantment with parameters of type ItemStack
Modifier
Constructor
Description
``
`EnchantItemEvent(@NotNull Player enchanter, @NotNull InventoryView view, @NotNull Block table, @NotNull ItemStack item, int level, @NotNull Map<Enchantment,Integer> enchants, int i)`
``
`PrepareItemEnchantEvent(@NotNull Player enchanter, @NotNull InventoryView view, @NotNull Block table, @NotNull ItemStack item, @Nullable EnchantmentOffer @NotNull [] offers, int bonus)`

## Uses of ItemStack in org.bukkit.event.entity

Methods in org.bukkit.event.entity that return ItemStack
Modifier and Type
Method
Description
`@NotNull ItemStack`
EntityShootBowEvent.`getArrowItem()`
Deprecated.
`@Nullable ItemStack`
EntityShootBowEvent.`getBow()`
Gets the bow ItemStack used to fire the arrow.
`@Nullable ItemStack`
EntityBreedEvent.`getBredWith()`
The ItemStack that was used to initiate breeding, if present.
`@Nullable ItemStack`
EntityShootBowEvent.`getConsumable()`
Get the ItemStack to be consumed in this event (if any).
`@NotNull ItemStack`
PiglinBarterEvent.`getInput()`
Gets the input of the barter.
`@Nullable ItemStack`
FoodLevelChangeEvent.`getItem()`
Gets the item that triggered this event, if any.
Methods in org.bukkit.event.entity that return types with arguments of type ItemStack
Modifier and Type
Method
Description
`@NotNull List<ItemStack>`
EntityDeathEvent.`getDrops()`
Gets all the items which will drop when the entity dies
`@NotNull List<ItemStack>`
PlayerDeathEvent.`getItemsToKeep()`
A mutable collection to add items that the player should retain in their inventory on death (Similar to KeepInventory game rule) You MUST remove the item from the .getDrops() collection too or it will duplicate!
`@NotNull List<ItemStack>`
PiglinBarterEvent.`getOutcome()`
Returns a mutable list representing the outcome of the barter.
Constructors in org.bukkit.event.entity with parameters of type ItemStack
Modifier
Constructor
Description
``
`EntityBreedEvent(@NotNull LivingEntity child, @NotNull LivingEntity mother, @NotNull LivingEntity father, @Nullable LivingEntity breeder, @Nullable ItemStack bredWith, int experience)`
``
`EntityShootBowEvent(@NotNull LivingEntity shooter, @Nullable ItemStack bow, @NotNull Entity projectile, float force)`
Deprecated.
``
`EntityShootBowEvent(@NotNull LivingEntity shooter, @Nullable ItemStack bow, @NotNull ItemStack arrowItem, @NotNull Entity projectile, float force)`
Deprecated.
``
`EntityShootBowEvent(@NotNull LivingEntity shooter, @Nullable ItemStack bow, @Nullable ItemStack consumable, @NotNull Entity projectile, @NotNull EquipmentSlot hand, float force, boolean consumeItem)`
``
`FoodLevelChangeEvent(@NotNull HumanEntity what, int level, @Nullable ItemStack item)`
``
`PiglinBarterEvent(@NotNull Piglin what, @NotNull ItemStack input, @NotNull List<ItemStack> outcome)`
Constructor parameters in org.bukkit.event.entity with type arguments of type ItemStack
Modifier
Constructor
Description
``
`EntityDeathEvent(@NotNull LivingEntity entity, @NotNull List<ItemStack> drops)`
``
`EntityDeathEvent(@NotNull LivingEntity what, @NotNull List<ItemStack> drops, int droppedExp)`
``
`PiglinBarterEvent(@NotNull Piglin what, @NotNull ItemStack input, @NotNull List<ItemStack> outcome)`
``
`PlayerDeathEvent(@NotNull Player player, @NotNull List<ItemStack> drops, int droppedExp, int newExp, int newTotalExp, int newLevel, @Nullable String deathMessage)`
Deprecated.
``
`PlayerDeathEvent(@NotNull Player player, @NotNull List<ItemStack> drops, int droppedExp, int newExp, int newTotalExp, int newLevel, @Nullable String deathMessage, boolean doExpDrop)`
Deprecated.
``
`PlayerDeathEvent(@NotNull Player player, @NotNull List<ItemStack> drops, int droppedExp, int newExp, int newTotalExp, int newLevel, Component adventure$deathMessage, @Nullable String deathMessage)`
``
`PlayerDeathEvent(@NotNull Player player, @NotNull List<ItemStack> drops, int droppedExp, int newExp, int newTotalExp, int newLevel, Component adventure$deathMessage, @Nullable String deathMessage, boolean doExpDrop)`
``
`PlayerDeathEvent(@NotNull Player player, @NotNull List<ItemStack> drops, int droppedExp, int newExp, @Nullable String deathMessage)`
Deprecated.
``
`PlayerDeathEvent(@NotNull Player player, @NotNull List<ItemStack> drops, int droppedExp, int newExp, Component adventure$deathMessage, @Nullable String deathMessage)`
``
`PlayerDeathEvent(@NotNull Player player, @NotNull List<ItemStack> drops, int droppedExp, @Nullable String deathMessage)`
``
`PlayerDeathEvent(@NotNull Player player, @NotNull List<ItemStack> drops, int droppedExp, Component adventure$deathMessage)`

## Uses of ItemStack in org.bukkit.event.hanging

Methods in org.bukkit.event.hanging that return ItemStack
Modifier and Type
Method
Description
`@Nullable ItemStack`
HangingPlaceEvent.`getItemStack()`
Gets the item from which the hanging entity originated
Constructors in org.bukkit.event.hanging with parameters of type ItemStack
Modifier
Constructor
Description
``
`HangingPlaceEvent(@NotNull Hanging hanging, @Nullable Player player, @NotNull Block block, @NotNull BlockFace blockFace, @Nullable EquipmentSlot hand, @Nullable ItemStack itemStack)`

## Uses of ItemStack in org.bukkit.event.inventory

Methods in org.bukkit.event.inventory that return ItemStack
Modifier and Type
Method
Description
`@Nullable ItemStack`
InventoryClickEvent.`getCurrentItem()`
Gets the ItemStack currently in the clicked slot.
`@Nullable ItemStack`
InventoryClickEvent.`getCursor()`
Gets the current ItemStack on the cursor.
`@NotNull ItemStack`
InventoryCreativeEvent.`getCursor()`
`@Nullable ItemStack`
InventoryDragEvent.`getCursor()`
Gets the result cursor after the drag is done.
`@NotNull ItemStack`
BrewingStandFuelEvent.`getFuel()`
Gets the ItemStack of the fuel before the amount was subtracted.
`@NotNull ItemStack`
FurnaceBurnEvent.`getFuel()`
Gets the fuel ItemStack for this event
`@NotNull ItemStack`
InventoryMoveItemEvent.`getItem()`
Gets the ItemStack being moved; if modified, the original item will not be removed from the source inventory.
`@NotNull ItemStack`
InventoryDragEvent.`getOldCursor()`
Gets an ItemStack representing the cursor prior to any modifications as a result of this drag.
`@Nullable ItemStack`
PrepareAnvilEvent.`getResult()`
Get result item, may be null.
`@Nullable ItemStack`
PrepareSmithingEvent.`getResult()`
Get result item, may be null.
`@NotNull ItemStack`
FurnaceStartSmeltEvent.`getSource()`
Gets the source ItemStack for this event
Methods in org.bukkit.event.inventory that return types with arguments of type ItemStack
Modifier and Type
Method
Description
`@NotNull Map<Integer,ItemStack>`
InventoryDragEvent.`getNewItems()`
Gets all items to be added to the inventory in this drag.
`@NotNull List<ItemStack>`
BrewEvent.`getResults()`
Gets the resulting items in the Brewing Stand.
Methods in org.bukkit.event.inventory with parameters of type ItemStack
Modifier and Type
Method
Description
`void`
InventoryClickEvent.`setCurrentItem(@Nullable ItemStack stack)`
Sets the ItemStack currently in the clicked slot.
`void`
InventoryClickEvent.`setCursor(@Nullable ItemStack stack)`
Deprecated.
This changes the ItemStack in their hand before any calculations are applied to the Inventory, which has a tendency to create inconsistencies between the Player and the server, and to make unexpected changes in the behavior of the clicked Inventory.
`void`
InventoryCreativeEvent.`setCursor(@NotNull ItemStack item)`
`void`
InventoryDragEvent.`setCursor(@Nullable ItemStack newCursor)`
Sets the result cursor after the drag is done.
`void`
InventoryMoveItemEvent.`setItem(@NotNull ItemStack itemStack)`
Sets the ItemStack being moved; if this is different from the original ItemStack, the original item will not be removed from the source inventory.
`void`
PrepareAnvilEvent.`setResult(@Nullable ItemStack result)`
`void`
PrepareSmithingEvent.`setResult(@Nullable ItemStack result)`
Constructors in org.bukkit.event.inventory with parameters of type ItemStack
Modifier
Constructor
Description
``
`BrewingStandFuelEvent(@NotNull Block brewingStand, @NotNull ItemStack fuel, int fuelPower)`
``
`FurnaceBurnEvent(@NotNull Block furnace, @NotNull ItemStack fuel, int burnTime)`
``
`FurnaceSmeltEvent(@NotNull Block furnace, @NotNull ItemStack source, @NotNull ItemStack result)`
Deprecated.
``
`FurnaceSmeltEvent(@NotNull Block furnace, @NotNull ItemStack source, @NotNull ItemStack result, CookingRecipe<?> recipe)`
``
`FurnaceStartSmeltEvent(@NotNull Block furnace, @NotNull ItemStack source, @NotNull CookingRecipe<?> recipe)`
Deprecated.
``
`FurnaceStartSmeltEvent(@NotNull Block furnace, @NotNull ItemStack source, @NotNull CookingRecipe<?> recipe, int cookingTime)`
``
`InventoryCreativeEvent(@NotNull InventoryView what, @NotNull InventoryType.SlotType type, int slot, @NotNull ItemStack newItem)`
``
`InventoryDragEvent(@NotNull InventoryView what, @Nullable ItemStack newCursor, @NotNull ItemStack oldCursor, boolean right, @NotNull Map<Integer,ItemStack> slots)`
``
`InventoryMoveItemEvent(@NotNull Inventory sourceInventory, @NotNull ItemStack itemStack, @NotNull Inventory destinationInventory, boolean didSourceInitiate)`
``
`PrepareAnvilEvent(@NotNull InventoryView inventory, @Nullable ItemStack result)`
``
`PrepareSmithingEvent(@NotNull InventoryView inventory, @Nullable ItemStack result)`
Constructor parameters in org.bukkit.event.inventory with type arguments of type ItemStack
Modifier
Constructor
Description
``
`BrewEvent(@NotNull Block brewer, @NotNull BrewerInventory contents, @NotNull List<ItemStack> results, int fuelLevel)`
``
`InventoryDragEvent(@NotNull InventoryView what, @Nullable ItemStack newCursor, @NotNull ItemStack oldCursor, boolean right, @NotNull Map<Integer,ItemStack> slots)`

## Uses of ItemStack in org.bukkit.event.player

Fields in org.bukkit.event.player declared as ItemStack
Modifier and Type
Field
Description
`protected ItemStack`
PlayerInteractEvent.`item`
Methods in org.bukkit.event.player that return ItemStack
Modifier and Type
Method
Description
`@NotNull ItemStack`
PlayerArmorStandManipulateEvent.`getArmorStandItem()`
Returns the item held by the armor stand.
`@Nullable ItemStack`
PlayerTakeLecternBookEvent.`getBook()`
Gets the current ItemStack on the lectern.
`@NotNull ItemStack`
PlayerItemBreakEvent.`getBrokenItem()`
Gets the item that broke
`@NotNull ItemStack`
PlayerBucketEntityEvent.`getEntityBucket()`
Gets the bucket that the `Entity` will be put into.
`@NotNull ItemStack`
PlayerBucketFishEvent.`getFishBucket()`
Deprecated.
Use `PlayerBucketEntityEvent.getEntityBucket()`
`@Nullable ItemStack`
PlayerInteractEvent.`getItem()`
Returns the item in hand represented by this event
`@NotNull ItemStack`
PlayerItemConsumeEvent.`getItem()`
Gets the item that is being consumed.
`@NotNull ItemStack`
PlayerItemDamageEvent.`getItem()`
Gets the item being damaged.
`@NotNull ItemStack`
PlayerItemMendEvent.`getItem()`
Get the `ItemStack` to be repaired.
`@NotNull ItemStack`
PlayerRiptideEvent.`getItem()`
Gets the item containing the used enchantment.
`@NotNull ItemStack`
PlayerShearEntityEvent.`getItem()`
Gets the item used to shear the entity.
`@Nullable ItemStack`
PlayerBucketEvent.`getItemStack()`
Get the resulting item in hand after the bucket event
`@Nullable ItemStack`
PlayerSwapHandItemsEvent.`getMainHandItem()`
Gets the item switched to the main hand.
`@Nullable ItemStack`
PlayerSwapHandItemsEvent.`getOffHandItem()`
Gets the item switched to the off hand.
`@NotNull ItemStack`
PlayerBucketEntityEvent.`getOriginalBucket()`
Gets the bucket used to capture the `Entity`.
`@NotNull ItemStack`
PlayerArmorStandManipulateEvent.`getPlayerItem()`
Returns the item held by the player.
`@Nullable ItemStack`
PlayerItemConsumeEvent.`getReplacement()`
Return the custom item stack that will replace the consumed item, or null if no custom replacement has been set (which means the default replacement will be used).
`@NotNull ItemStack`
PlayerBucketFishEvent.`getWaterBucket()`
Deprecated.
Use `PlayerBucketEntityEvent.getOriginalBucket()`
Methods in org.bukkit.event.player that return types with arguments of type ItemStack
Modifier and Type
Method
Description
`@NotNull List<ItemStack>`
PlayerHarvestBlockEvent.`getItemsHarvested()`
Gets a list of items that are being harvested from this block.
Methods in org.bukkit.event.player with parameters of type ItemStack
Modifier and Type
Method
Description
`void`
PlayerItemConsumeEvent.`setItem(@Nullable ItemStack item)`
Set the item being consumed
`void`
PlayerBucketEvent.`setItemStack(@Nullable ItemStack itemStack)`
Set the item in hand after the event
`void`
PlayerSwapHandItemsEvent.`setMainHandItem(@Nullable ItemStack mainHandItem)`
Sets the item in the main hand.
`void`
PlayerSwapHandItemsEvent.`setOffHandItem(@Nullable ItemStack offHandItem)`
Sets the item in the off hand.
`void`
PlayerItemConsumeEvent.`setReplacement(@Nullable ItemStack replacement)`
Set a custom item stack to replace the consumed item.
Constructors in org.bukkit.event.player with parameters of type ItemStack
Modifier
Constructor
Description
``
`PlayerArmorStandManipulateEvent(@NotNull Player who, @NotNull ArmorStand clickedEntity, @NotNull ItemStack playerItem, @NotNull ItemStack armorStandItem, @NotNull EquipmentSlot slot)`
Deprecated.
``
`PlayerArmorStandManipulateEvent(@NotNull Player who, @NotNull ArmorStand clickedEntity, @NotNull ItemStack playerItem, @NotNull ItemStack armorStandItem, @NotNull EquipmentSlot slot, @NotNull EquipmentSlot hand)`
``
`PlayerBucketEmptyEvent(@NotNull Player who, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand)`
Deprecated.
``
`PlayerBucketEmptyEvent(@NotNull Player who, @NotNull Block block, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand)`
Deprecated.
``
`PlayerBucketEmptyEvent(@NotNull Player who, @NotNull Block block, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand, @NotNull EquipmentSlot hand)`
``
`PlayerBucketEntityEvent(@NotNull Player player, @NotNull Entity entity, @NotNull ItemStack originalBucket, @NotNull ItemStack entityBucket, @NotNull EquipmentSlot hand)`
``
`PlayerBucketEvent(@NotNull Player who, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand)`
Deprecated.
``
`PlayerBucketEvent(@NotNull Player who, @NotNull Block block, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand)`
Deprecated.
``
`PlayerBucketEvent(@NotNull Player who, @NotNull Block block, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand, @NotNull EquipmentSlot hand)`
``
`PlayerBucketFillEvent(@NotNull Player who, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand)`
Deprecated.
``
`PlayerBucketFillEvent(@NotNull Player who, @NotNull Block block, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand)`
Deprecated.
``
`PlayerBucketFillEvent(@NotNull Player who, @NotNull Block block, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand, @NotNull EquipmentSlot hand)`
``
`PlayerBucketFishEvent(@NotNull Player player, @NotNull Fish fish, @NotNull ItemStack waterBucket, @NotNull ItemStack fishBucket, @NotNull EquipmentSlot hand)`
Deprecated.
``
`PlayerInteractEvent(@NotNull Player who, @NotNull Action action, @Nullable ItemStack item, @Nullable Block clickedBlock, @NotNull BlockFace clickedFace)`
``
`PlayerInteractEvent(@NotNull Player who, @NotNull Action action, @Nullable ItemStack item, @Nullable Block clickedBlock, @NotNull BlockFace clickedFace, @Nullable EquipmentSlot hand)`
``
`PlayerInteractEvent(@NotNull Player who, @NotNull Action action, @Nullable ItemStack item, @Nullable Block clickedBlock, @NotNull BlockFace clickedFace, @Nullable EquipmentSlot hand, @Nullable Location interactionPoint)`
``
`PlayerItemBreakEvent(@NotNull Player player, @NotNull ItemStack brokenItem)`
``
`PlayerItemConsumeEvent(@NotNull Player player, @NotNull ItemStack item)`
Deprecated.
use `PlayerItemConsumeEvent(Player, ItemStack, EquipmentSlot)`
``
`PlayerItemConsumeEvent(@NotNull Player player, @NotNull ItemStack item, @NotNull EquipmentSlot hand)`
``
`PlayerItemDamageEvent(@NotNull Player player, @NotNull ItemStack what, int damage)`
Deprecated.
``
`PlayerItemDamageEvent(@NotNull Player player, @NotNull ItemStack what, int damage, int originalDamage)`
``
`PlayerItemMendEvent(@NotNull Player who, @NotNull ItemStack item, @NotNull ExperienceOrb experienceOrb, int repairAmount)`
Deprecated.
``
`PlayerItemMendEvent(@NotNull Player who, @NotNull ItemStack item, @NotNull EquipmentSlot slot, @NotNull ExperienceOrb experienceOrb, int repairAmount)`
``
`PlayerRiptideEvent(@NotNull Player who, @NotNull ItemStack item)`
``
`PlayerShearEntityEvent(@NotNull Player who, @NotNull Entity what, @NotNull ItemStack item, @NotNull EquipmentSlot hand)`
``
`PlayerSwapHandItemsEvent(@NotNull Player player, @NotNull ItemStack mainHandItem, @NotNull ItemStack offHandItem)`
Constructor parameters in org.bukkit.event.player with type arguments of type ItemStack
Modifier
Constructor
Description
``
`PlayerHarvestBlockEvent(@NotNull Player player, @NotNull Block harvestedBlock, @NotNull List<ItemStack> itemsHarvested)`
Deprecated.
``
`PlayerHarvestBlockEvent(@NotNull Player player, @NotNull Block harvestedBlock, @NotNull EquipmentSlot hand, @NotNull List<ItemStack> itemsHarvested)`

## Uses of ItemStack in org.bukkit.event.world

Methods in org.bukkit.event.world that return types with arguments of type ItemStack
Modifier and Type
Method
Description
`@NotNull List<ItemStack>`
LootGenerateEvent.`getLoot()`
Get a mutable list of all loot to be generated.
Method parameters in org.bukkit.event.world with type arguments of type ItemStack
Modifier and Type
Method
Description
`void`
LootGenerateEvent.`setLoot(@Nullable Collection<ItemStack> loot)`
Set the loot to be generated.
Constructor parameters in org.bukkit.event.world with type arguments of type ItemStack
Modifier
Constructor
Description
``
`LootGenerateEvent(@NotNull World world, @Nullable Entity entity, @Nullable InventoryHolder inventoryHolder, @NotNull LootTable lootTable, @NotNull LootContext lootContext, @NotNull List<ItemStack> items, boolean plugin)`

## Uses of ItemStack in org.bukkit.inventory

Methods in org.bukkit.inventory that return ItemStack
Modifier and Type
Method
Description
`@NotNull ItemStack`
ItemStack.`add()`
Adds 1 to this itemstack.
`@NotNull ItemStack`
ItemStack.`add(int qty)`
Adds quantity to this itemstack.
`@NotNull ItemStack`
ItemStack.`asOne()`
Clones the itemstack and returns it a single quantity.
`@NotNull ItemStack`
ItemStack.`asQuantity(int qty)`
Clones the itemstack and returns it as the specified quantity
`@NotNull ItemStack`
ItemStack.`clone()`
`@NotNull ItemStack`
ItemFactory.`createItemStack(@NotNull String input)`
Create a new `ItemStack` given the supplied input.
`@NotNull ItemStack`
ItemStack.`damage(int amount, LivingEntity livingEntity)`
Damages this itemstack by the specified amount.
`static @NotNull ItemStack`
ItemStack.`deserialize(@NotNull Map<String,Object> args)`
Required method for configuration serialization
`static @NotNull ItemStack`
ItemStack.`deserializeBytes(@org.jetbrains.annotations.NotNull byte[] bytes)`
Deserializes this itemstack from raw NBT bytes.
`@NotNull ItemStack`
ItemFactory.`enchantWithLevels(@NotNull ItemStack itemStack, @org.jetbrains.annotations.Range(from=1L, to=30L) int levels, boolean allowTreasure, Random random)`
Randomly enchants a copy of the provided `ItemStack` using the given experience levels.
`@NotNull ItemStack`
ItemStack.`enchantWithLevels(@org.jetbrains.annotations.Range(from=1L, to=30L) int levels, boolean allowTreasure, Random random)`
Randomly enchants a copy of this `ItemStack` using the given experience levels.
`@NotNull ItemStack`
ItemFactory.`ensureServerConversions(@NotNull ItemStack item)`
Minecraft updates are converting simple item stacks into more complex NBT oriented Item Stacks.
`@NotNull ItemStack`
ItemStack.`ensureServerConversions()`
Minecraft updates are converting simple item stacks into more complex NBT oriented Item Stacks.
`@Nullable ItemStack`
MerchantRecipe.`getAdjustedIngredient1()`
Gets the `adjusted` first ingredient.
`@Nullable ItemStack`
ArmoredHorseInventory.`getArmor()`
Gets the item in the horse's armor slot.
`ItemStack @NotNull []`
EntityEquipment.`getArmorContents()`
Gets all worn armor
`@Nullable ItemStack @NotNull []`
PlayerInventory.`getArmorContents()`
Get all ItemStacks from the armor slots
`default @Nullable ItemStack`
LecternInventory.`getBook()`
Gets the lectern's held book.
`ItemStack`
EntityEquipment.`getBoots()`
Gets the boots currently being worn by the entity
`@Nullable ItemStack`
PlayerInventory.`getBoots()`
Return the ItemStack from the boots slot
`ItemStack`
EntityEquipment.`getChestplate()`
Gets the chest plate currently being worn by the entity
`@Nullable ItemStack`
PlayerInventory.`getChestplate()`
Return the ItemStack from the chestplate slot
`@Nullable ItemStack @NotNull []`
Inventory.`getContents()`
Returns all ItemStacks from the inventory
`final @Nullable ItemStack`
InventoryView.`getCursor()`
Get the item on the cursor of one of the viewing players.
`@Nullable ItemStack`
LlamaInventory.`getDecor()`
Gets the item in the llama's decor slot.
`@Nullable ItemStack @NotNull []`
PlayerInventory.`getExtraContents()`
Get all additional ItemStacks stored in this inventory.
`default @Nullable ItemStack`
AnvilInventory.`getFirstItem()`
Gets the item in the left input slot.
`@Nullable ItemStack`
BrewerInventory.`getFuel()`
Get the current fuel for brewing.
`@Nullable ItemStack`
FurnaceInventory.`getFuel()`
Get the current fuel.
`ItemStack`
EntityEquipment.`getHelmet()`
Gets the helmet currently being worn by the entity
`@Nullable ItemStack`
PlayerInventory.`getHelmet()`
Return the ItemStack from the helmet slot
`@Nullable ItemStack`
BrewerInventory.`getIngredient()`
Get the current ingredient for brewing.
`@NotNull ItemStack`
CookingRecipe.`getInput()`
Deprecated.
Use `CookingRecipe.getInputChoice()` instead for more complete data.
`@NotNull ItemStack`
StonecuttingRecipe.`getInput()`
Deprecated.
Use `StonecuttingRecipe.getInputChoice()` instead for more complete data.
`default @Nullable ItemStack`
SmithingInventory.`getInputEquipment()`
Gets the input equipment (first slot).
`default @Nullable ItemStack`
StonecutterInventory.`getInputItem()`
Gets the input item.
`default @Nullable ItemStack`
SmithingInventory.`getInputMineral()`
Gets the input mineral (second slot).
`@Nullable ItemStack`
BeaconInventory.`getItem()`
Get the item powering the beacon.
`@Nullable ItemStack`
EnchantingInventory.`getItem()`
Get the item being enchanted.
`@NotNull ItemStack`
EntityEquipment.`getItem(@NotNull EquipmentSlot slot)`
Gets the ItemStack at the given equipment slot in the inventory.
`@Nullable ItemStack`
Inventory.`getItem(int index)`
Returns the ItemStack found in the slot at the given index
`@Nullable ItemStack`
InventoryView.`getItem(int slot)`
Gets one item in this inventory view by its raw slot ID.
`@NotNull ItemStack`
PlayerInventory.`getItem(@NotNull EquipmentSlot slot)`
Gets the ItemStack at the given equipment slot in the inventory.
`@NotNull ItemStack`
EntityEquipment.`getItemInHand()`
Deprecated.
entities can duel wield now use the methods for the specific hand instead
`@NotNull ItemStack`
PlayerInventory.`getItemInHand()`
Deprecated.
players can duel wield now use the methods for the specific hand instead
`@NotNull ItemStack`
EntityEquipment.`getItemInMainHand()`
Gets the item the entity is currently holding in their main hand.
`@NotNull ItemStack`
PlayerInventory.`getItemInMainHand()`
Gets the item the player is currently holding in their main hand.
`@NotNull ItemStack`
EntityEquipment.`getItemInOffHand()`
Gets the item the entity is currently holding in their off hand.
`@NotNull ItemStack`
PlayerInventory.`getItemInOffHand()`
Gets the item the player is currently holding in their off hand.
`@NotNull ItemStack`
RecipeChoice.ExactChoice.`getItemStack()`
`@NotNull ItemStack`
RecipeChoice.`getItemStack()`
Deprecated.
for compatibility only
`@NotNull ItemStack`
RecipeChoice.MaterialChoice.`getItemStack()`
`ItemStack`
EntityEquipment.`getLeggings()`
Gets the leggings currently being worn by the entity
`@Nullable ItemStack`
PlayerInventory.`getLeggings()`
Return the ItemStack from the leg slot
`default @Nullable ItemStack`
GrindstoneInventory.`getLowerItem()`
Gets the lower input item.
`@Nullable ItemStack @NotNull []`
CraftingInventory.`getMatrix()`
Get the contents of the crafting matrix.
`default @Nullable ItemStack`
AnvilInventory.`getResult()`
Gets the item in the result slot.
`@NotNull ItemStack`
CookingRecipe.`getResult()`
Get the result of this recipe.
`@Nullable ItemStack`
CraftingInventory.`getResult()`
Check what item is in the result slot of this crafting inventory.
`@Nullable ItemStack`
FurnaceInventory.`getResult()`
Get the current item in the result slot.
`default @Nullable ItemStack`
GrindstoneInventory.`getResult()`
Gets the result.
`@NotNull ItemStack`
MerchantRecipe.`getResult()`
`@NotNull ItemStack`
Recipe.`getResult()`
Get the result of this recipe.
`@NotNull ItemStack`
ShapedRecipe.`getResult()`
Get the result.
`@NotNull ItemStack`
ShapelessRecipe.`getResult()`
Get the result of this recipe.
`@Nullable ItemStack`
SmithingInventory.`getResult()`
Check what item is in the result slot of this smithing table.
`@NotNull ItemStack`
SmithingRecipe.`getResult()`
`default @Nullable ItemStack`
StonecutterInventory.`getResult()`
Gets the result item.
`@NotNull ItemStack`
StonecuttingRecipe.`getResult()`
Get the result of this recipe.
`@Nullable ItemStack`
AbstractHorseInventory.`getSaddle()`
Gets the item in the horse's saddle slot.
`@Nullable ItemStack`
EnchantingInventory.`getSecondary()`
Get the secondary item being used for the enchant.
`default @Nullable ItemStack`
AnvilInventory.`getSecondItem()`
Gets the item in the right input slot.
`@Nullable ItemStack`
FurnaceInventory.`getSmelting()`
Get the item currently smelting.
`@Nullable ItemStack`
ItemFactory.`getSpawnEgg(EntityType type)`
Get a spawn egg ItemStack from an EntityType
`@Nullable ItemStack @NotNull []`
Inventory.`getStorageContents()`
Return the contents from the section of the inventory where items can reasonably be expected to be stored.
`default @Nullable ItemStack`
GrindstoneInventory.`getUpperItem()`
Gets the upper input item.
`@NotNull ItemStack`
ItemStack.`subtract()`
Subtracts 1 to this itemstack.
`@NotNull ItemStack`
ItemStack.`subtract(int qty)`
Subtracts quantity to this itemstack.
Methods in org.bukkit.inventory that return types with arguments of type ItemStack
Modifier and Type
Method
Description
`@NotNull HashMap<Integer,ItemStack>`
Inventory.`addItem(@NotNull ItemStack... items)`
Stores the given ItemStacks in the inventory.
`@NotNull HashMap<Integer,? extends ItemStack>`
Inventory.`all(@NotNull Material material)`
Returns a HashMap with all slots and ItemStacks in the inventory with the given Material.
`@NotNull HashMap<Integer,? extends ItemStack>`
Inventory.`all(@Nullable ItemStack item)`
Finds all slots in the inventory containing any ItemStacks with the given ItemStack.
`@NotNull List<ItemStack>`
RecipeChoice.ExactChoice.`getChoices()`
`@NotNull List<ItemStack>`
ShapelessRecipe.`getIngredientList()`
Deprecated.
Use `ShapelessRecipe.getChoiceList()` instead for more complete data.
`@NotNull Map<Character,ItemStack>`
ShapedRecipe.`getIngredientMap()`
Deprecated.
Use `ShapedRecipe.getChoiceMap()` instead for more complete data.
`@NotNull List<ItemStack>`
MerchantRecipe.`getIngredients()`
`@NotNull ListIterator<ItemStack>`
Inventory.`iterator()`
`@NotNull ListIterator<ItemStack>`
Inventory.`iterator(int index)`
Returns an iterator starting at the given index.
`@NotNull HashMap<Integer,ItemStack>`
Inventory.`removeItem(@NotNull ItemStack... items)`
Removes the given ItemStacks from the storage contents of the inventory.
`@NotNull HashMap<Integer,ItemStack>`
Inventory.`removeItemAnySlot(@NotNull ItemStack... items)`
Searches all possible inventory slots in order to remove the given ItemStacks.
Methods in org.bukkit.inventory with parameters of type ItemStack
Modifier and Type
Method
Description
`void`
MerchantRecipe.`addIngredient(@NotNull ItemStack item)`
`@NotNull ShapelessRecipe`
ShapelessRecipe.`addIngredient(int count, @NotNull ItemStack item)`
`@NotNull ShapelessRecipe`
ShapelessRecipe.`addIngredient(@NotNull ItemStack item)`
`@NotNull HashMap<Integer,ItemStack>`
Inventory.`addItem(@NotNull ItemStack... items)`
Stores the given ItemStacks in the inventory.
`void`
MerchantRecipe.`adjust(@Nullable ItemStack itemStack)`
Modifies the amount of the given `ItemStack` in the same way as MerchantRecipe dynamically adjusts the amount of the first ingredient during trading.
`@NotNull HashMap<Integer,? extends ItemStack>`
Inventory.`all(@Nullable ItemStack item)`
Finds all slots in the inventory containing any ItemStacks with the given ItemStack.
`HoverEvent<HoverEvent.ShowItem>`
ItemFactory.`asHoverEvent(@NotNull ItemStack item, UnaryOperator<HoverEvent.ShowItem> op)`
Creates a hover event for the given item.
`@Nullable ItemMeta`
ItemFactory.`asMetaFor(@NotNull ItemMeta meta, @NotNull ItemStack stack)`
Returns an appropriate item meta for the specified stack.
`boolean`
ItemStack.`canRepair(@NotNull ItemStack toBeRepaired)`
Checks if this itemstack can repair another.
`boolean`
FurnaceInventory.`canSmelt(@Nullable ItemStack item)`
Check if an item can be smelted in this furnace container
`boolean`
Inventory.`contains(@Nullable ItemStack item)`
Checks if the inventory contains any ItemStacks matching the given ItemStack.
`boolean`
Inventory.`contains(@Nullable ItemStack item, int amount)`
Checks if the inventory contains at least the minimum amount specified of exactly matching ItemStacks.
`boolean`
Inventory.`containsAtLeast(@Nullable ItemStack item, int amount)`
Checks if the inventory contains ItemStacks matching the given ItemStack whose amounts sum to at least the minimum amount specified.
`Component`
ItemFactory.`displayName(@NotNull ItemStack itemStack)`
Get the formatted display name of the `ItemStack`.
`@NotNull ItemStack`
ItemFactory.`enchantWithLevels(@NotNull ItemStack itemStack, @org.jetbrains.annotations.Range(from=1L, to=30L) int levels, boolean allowTreasure, Random random)`
Randomly enchants a copy of the provided `ItemStack` using the given experience levels.
`@NotNull ItemStack`
ItemFactory.`ensureServerConversions(@NotNull ItemStack item)`
Minecraft updates are converting simple item stacks into more complex NBT oriented Item Stacks.
`int`
Inventory.`first(@NotNull ItemStack item)`
Returns the first slot in the inventory containing an ItemStack with the given stack.
`@Nullable String`
ItemFactory.`getI18NDisplayName(@Nullable ItemStack item)`
Deprecated.
`ItemStack` implements `Translatable`; use that and `Component.translatable(net.kyori.adventure.translation.Translatable)` instead.
`net.md_5.bungee.api.chat.hover.content.Content`
ItemFactory.`hoverContentOf(@NotNull ItemStack itemStack)`
Creates a `Content` of that ItemStack for displaying.
`boolean`
ItemFactory.`isApplicable(@Nullable ItemMeta meta, @Nullable ItemStack stack)`
This method checks the item meta to confirm that it is applicable (no data lost if applied) to the specified ItemStack.
`boolean`
FurnaceInventory.`isFuel(@Nullable ItemStack item)`
Check if an item can be used as a fuel source in this furnace container
`boolean`
ItemStack.`isRepairableBy(@NotNull ItemStack repairMaterial)`
Checks if an itemstack can repair this itemstack.
`boolean`
ItemStack.`isSimilar(@Nullable ItemStack stack)`
This method is the same as equals, but does not consider stack size (amount).
`void`
Inventory.`remove(@NotNull ItemStack item)`
Removes all stacks in the inventory matching the given stack.
`@NotNull ShapelessRecipe`
ShapelessRecipe.`removeIngredient(int count, @NotNull ItemStack item)`
`@NotNull ShapelessRecipe`
ShapelessRecipe.`removeIngredient(@NotNull ItemStack item)`
`@NotNull HashMap<Integer,ItemStack>`
Inventory.`removeItem(@NotNull ItemStack... items)`
Removes the given ItemStacks from the storage contents of the inventory.
`@NotNull HashMap<Integer,ItemStack>`
Inventory.`removeItemAnySlot(@NotNull ItemStack... items)`
Searches all possible inventory slots in order to remove the given ItemStacks.
`void`
ArmoredHorseInventory.`setArmor(@Nullable ItemStack stack)`
Sets the item in the horse's armor slot.
`void`
EntityEquipment.`setArmorContents(@NotNull ItemStack[] items)`
Sets the entities armor to the provided array of ItemStacks
`void`
PlayerInventory.`setArmorContents(@Nullable ItemStack[] items)`
Put the given ItemStacks into the armor slots
`default void`
LecternInventory.`setBook(@Nullable ItemStack book)`
Sets the lectern's held book.
`void`
EntityEquipment.`setBoots(@Nullable ItemStack boots)`
Sets the boots worn by the entity
`void`
EntityEquipment.`setBoots(@Nullable ItemStack boots, boolean silent)`
Sets the boots worn by the entity
`void`
PlayerInventory.`setBoots(@Nullable ItemStack boots)`
Put the given ItemStack into the boots slot.
`void`
EntityEquipment.`setChestplate(@Nullable ItemStack chestplate)`
Sets the chest plate worn by the entity
`void`
EntityEquipment.`setChestplate(@Nullable ItemStack chestplate, boolean silent)`
Sets the chest plate worn by the entity
`void`
PlayerInventory.`setChestplate(@Nullable ItemStack chestplate)`
Put the given ItemStack into the chestplate slot.
`void`
Inventory.`setContents(@Nullable ItemStack @NotNull [] items)`
Completely replaces the inventory's contents.
`final void`
InventoryView.`setCursor(@Nullable ItemStack item)`
Sets the item on the cursor of one of the viewing players.
`void`
LlamaInventory.`setDecor(@Nullable ItemStack stack)`
Sets the item in the llama's decor slot.
`void`
PlayerInventory.`setExtraContents(@Nullable ItemStack[] items)`
Put the given ItemStacks into the extra slots
See `PlayerInventory.getExtraContents()` for an explanation of extra slots.
`default void`
AnvilInventory.`setFirstItem(@Nullable ItemStack firstItem)`
Sets the item in the left input slot.
`void`
BrewerInventory.`setFuel(@Nullable ItemStack fuel)`
Set the current fuel for brewing.
`void`
FurnaceInventory.`setFuel(@Nullable ItemStack stack)`
Set the current fuel.
`void`
EntityEquipment.`setHelmet(@Nullable ItemStack helmet)`
Sets the helmet worn by the entity
`void`
EntityEquipment.`setHelmet(@Nullable ItemStack helmet, boolean silent)`
Sets the helmet worn by the entity
`void`
PlayerInventory.`setHelmet(@Nullable ItemStack helmet)`
Put the given ItemStack into the helmet slot.
`void`
BrewerInventory.`setIngredient(@Nullable ItemStack ingredient)`
Set the current ingredient for brewing.
`@NotNull ShapedRecipe`
ShapedRecipe.`setIngredient(char key, @NotNull ItemStack item)`
`default void`
SmithingInventory.`setInputEquipment(@Nullable ItemStack itemStack)`
Sets the input equipment (first slot).
`default void`
StonecutterInventory.`setInputItem(@Nullable ItemStack itemStack)`
Sets the input item.
`default void`
SmithingInventory.`setInputMineral(@Nullable ItemStack itemStack)`
Sets the input mineral (second slot).
`void`
BeaconInventory.`setItem(@Nullable ItemStack item)`
Set the item powering the beacon.
`void`
EnchantingInventory.`setItem(@Nullable ItemStack item)`
Set the item being enchanted.
`void`
EntityEquipment.`setItem(@NotNull EquipmentSlot slot, @Nullable ItemStack item)`
Stores the ItemStack at the given equipment slot in the inventory.
`void`
EntityEquipment.`setItem(@NotNull EquipmentSlot slot, @Nullable ItemStack item, boolean silent)`
Stores the ItemStack at the given equipment slot in the inventory.
`void`
Inventory.`setItem(int index, @Nullable ItemStack item)`
Stores the ItemStack at the given index of the inventory.
`void`
InventoryView.`setItem(int slot, @Nullable ItemStack item)`
Sets one item in this inventory view by its raw slot ID.
`void`
PlayerInventory.`setItem(int index, @Nullable ItemStack item)`
Stores the ItemStack at the given index of the inventory.
`void`
PlayerInventory.`setItem(@NotNull EquipmentSlot slot, @Nullable ItemStack item)`
Stores the ItemStack at the given equipment slot in the inventory.
`void`
EntityEquipment.`setItemInHand(@Nullable ItemStack stack)`
Deprecated.
entities can duel wield now use the methods for the specific hand instead
`void`
PlayerInventory.`setItemInHand(@Nullable ItemStack stack)`
Deprecated.
players can duel wield now use the methods for the specific hand instead
`void`
EntityEquipment.`setItemInMainHand(@Nullable ItemStack item)`
Sets the item the entity is holding in their main hand.
`void`
EntityEquipment.`setItemInMainHand(@Nullable ItemStack item, boolean silent)`
Sets the item the entity is holding in their main hand.
`void`
PlayerInventory.`setItemInMainHand(@Nullable ItemStack item)`
Sets the item the player is holding in their main hand.
`void`
EntityEquipment.`setItemInOffHand(@Nullable ItemStack item)`
Sets the item the entity is holding in their off hand.
`void`
EntityEquipment.`setItemInOffHand(@Nullable ItemStack item, boolean silent)`
Sets the item the entity is holding in their off hand.
`void`
PlayerInventory.`setItemInOffHand(@Nullable ItemStack item)`
Sets the item the player is holding in their off hand.
`void`
EntityEquipment.`setLeggings(@Nullable ItemStack leggings)`
Sets the leggings worn by the entity
`void`
EntityEquipment.`setLeggings(@Nullable ItemStack leggings, boolean silent)`
Sets the leggings worn by the entity
`void`
PlayerInventory.`setLeggings(@Nullable ItemStack leggings)`
Put the given ItemStack into the leg slot.
`default void`
GrindstoneInventory.`setLowerItem(@Nullable ItemStack lowerItem)`
Sets the lower input item.
`void`
CraftingInventory.`setMatrix(@Nullable ItemStack @NotNull [] contents)`
Replace the contents of the crafting matrix
`default void`
AnvilInventory.`setResult(@Nullable ItemStack result)`
Sets the item in the result slot.
`void`
CraftingInventory.`setResult(@Nullable ItemStack newResult)`
Set the item in the result slot of the crafting inventory.
`void`
FurnaceInventory.`setResult(@Nullable ItemStack stack)`
Set the current item in the result slot.
`default void`
GrindstoneInventory.`setResult(@Nullable ItemStack result)`
Sets the result.
`void`
SmithingInventory.`setResult(@Nullable ItemStack newResult)`
Set the item in the result slot of the smithing table
`default void`
StonecutterInventory.`setResult(@Nullable ItemStack itemStack)`
Sets the result item.
`void`
AbstractHorseInventory.`setSaddle(@Nullable ItemStack stack)`
Sets the item in the horse's saddle slot.
`void`
EnchantingInventory.`setSecondary(@Nullable ItemStack item)`
Set the secondary item being used for the enchant.
`default void`
AnvilInventory.`setSecondItem(@Nullable ItemStack secondItem)`
Sets the item in the right input slot.
`void`
FurnaceInventory.`setSmelting(@Nullable ItemStack stack)`
Set the item currently smelting.
`void`
Inventory.`setStorageContents(@Nullable ItemStack @NotNull [] items)`
Put the given ItemStacks into the storage slots
`default void`
GrindstoneInventory.`setUpperItem(@Nullable ItemStack upperItem)`
Sets the upper input item.
`boolean`
RecipeChoice.ExactChoice.`test(@NotNull ItemStack t)`
`boolean`
RecipeChoice.MaterialChoice.`test(@NotNull ItemStack t)`
`boolean`
RecipeChoice.`test(@NotNull ItemStack itemStack)`
Method parameters in org.bukkit.inventory with type arguments of type ItemStack
Modifier and Type
Method
Description
`void`
MerchantRecipe.`setIngredients(@NotNull List<ItemStack> ingredients)`
Constructors in org.bukkit.inventory with parameters of type ItemStack
Modifier
Constructor
Description
``
`BlastingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime)`
``
`BlastingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, float experience, int cookingTime)`
``
`CampfireRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime)`
``
`CampfireRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, float experience, int cookingTime)`
``
`CookingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime)`
Create a cooking recipe to craft the specified ItemStack.
``
`CookingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, float experience, int cookingTime)`
Create a cooking recipe to craft the specified ItemStack.
``
`ExactChoice(@NotNull ItemStack stack)`
``
`ExactChoice(@NotNull ItemStack... stacks)`
``
`FurnaceRecipe(@NotNull ItemStack result, @NotNull Material source)`
Deprecated.
``
`FurnaceRecipe(@NotNull ItemStack result, @NotNull MaterialData source)`
Deprecated.
``
`FurnaceRecipe(@NotNull ItemStack result, @NotNull MaterialData source, float experience)`
Deprecated.
``
`FurnaceRecipe(@NotNull ItemStack result, @NotNull Material source, int data)`
Deprecated.
``
`FurnaceRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime)`
Create a furnace recipe to craft the specified ItemStack.
``
`FurnaceRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, float experience, int cookingTime)`
Create a furnace recipe to craft the specified ItemStack.
``
`FurnaceRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, int data, float experience, int cookingTime)`
Deprecated.
``
`ItemStack(@NotNull ItemStack stack)`
Creates a new item stack derived from the specified stack
``
`MerchantRecipe(@NotNull ItemStack result, int maxUses)`
``
`MerchantRecipe(@NotNull ItemStack result, int uses, int maxUses, boolean experienceReward)`
``
`MerchantRecipe(@NotNull ItemStack result, int uses, int maxUses, boolean experienceReward, int villagerExperience, float priceMultiplier)`
``
`MerchantRecipe(@NotNull ItemStack result, int uses, int maxUses, boolean experienceReward, int villagerExperience, float priceMultiplier, boolean ignoreDiscounts)`
``
`MerchantRecipe(@NotNull ItemStack result, int uses, int maxUses, boolean experienceReward, int villagerExperience, float priceMultiplier, int demand, int specialPrice)`
``
`MerchantRecipe(@NotNull ItemStack result, int uses, int maxUses, boolean experienceReward, int villagerExperience, float priceMultiplier, int demand, int specialPrice, boolean ignoreDiscounts)`
``
`ShapedRecipe(@NotNull ItemStack result)`
Deprecated.
``
`ShapedRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result)`
Create a shaped recipe to craft the specified ItemStack.
``
`ShapelessRecipe(@NotNull ItemStack result)`
Deprecated.
``
`ShapelessRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result)`
Create a shapeless recipe to craft the specified ItemStack.
``
`SmithingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice base, @NotNull RecipeChoice addition)`
Create a smithing recipe to produce the specified result ItemStack.
``
`SmithingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice base, @NotNull RecipeChoice addition, boolean copyNbt)`
Create a smithing recipe to produce the specified result ItemStack.
``
`SmokingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime)`
``
`SmokingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, float experience, int cookingTime)`
``
`StonecuttingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input)`
Create a cooking recipe to craft the specified ItemStack.
``
`StonecuttingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source)`
Create a Stonecutting recipe to craft the specified ItemStack.
Constructor parameters in org.bukkit.inventory with type arguments of type ItemStack
Modifier
Constructor
Description
``
`ExactChoice(@NotNull List<ItemStack> choices)`

## Uses of ItemStack in org.bukkit.inventory.meta

Methods in org.bukkit.inventory.meta that return types with arguments of type ItemStack
Modifier and Type
Method
Description
`@NotNull List<ItemStack>`
CrossbowMeta.`getChargedProjectiles()`
Returns an immutable list of the projectiles charged on this item.
`@NotNull List<ItemStack>`
BundleMeta.`getItems()`
Returns an immutable list of the items stored in this item.
Methods in org.bukkit.inventory.meta with parameters of type ItemStack
Modifier and Type
Method
Description
`void`
CrossbowMeta.`addChargedProjectile(@NotNull ItemStack item)`
Adds a charged projectile to this item.
`void`
BundleMeta.`addItem(@NotNull ItemStack item)`
Adds an item to this item.
Method parameters in org.bukkit.inventory.meta with type arguments of type ItemStack
Modifier and Type
Method
Description
`void`
CrossbowMeta.`setChargedProjectiles(@Nullable List<ItemStack> projectiles)`
Sets the projectiles charged on this item.
`void`
BundleMeta.`setItems(@Nullable List<ItemStack> items)`
Sets the items stored in this item.

## Uses of ItemStack in org.bukkit.loot

Methods in org.bukkit.loot that return types with arguments of type ItemStack
Modifier and Type
Method
Description
`@NotNull Collection<ItemStack>`
LootTable.`populateLoot(@Nullable Random random, @NotNull LootContext context)`
Returns a mutable list of loot generated by this LootTable.

## Uses of ItemStack in org.bukkit.material

Methods in org.bukkit.material that return ItemStack
Modifier and Type
Method
Description
`ItemStack`
MaterialData.`toItemStack()`
Deprecated.
this method creates an ItemStack of size 0 which is not generally useful.
`ItemStack`
MaterialData.`toItemStack(int amount)`
Deprecated.
Creates a new ItemStack based on this MaterialData

## Uses of ItemStack in org.bukkit.potion

Methods in org.bukkit.potion that return ItemStack
Modifier and Type
Method
Description
`@NotNull ItemStack`
Potion.`toItemStack(int amount)`
Deprecated.
Converts this potion to an `ItemStack` with the specified amount and a correct damage value.
Methods in org.bukkit.potion with parameters of type ItemStack
Modifier and Type
Method
Description
`void`
Potion.`apply(@NotNull ItemStack to)`
Deprecated.
Applies the effects of this potion to the given `ItemStack`.
`static @NotNull Potion`
Potion.`fromItemStack(@NotNull ItemStack item)`
Deprecated.