Uses of Class
org.bukkit.inventory.ItemStack
Packages that use ItemStack
Package
Description
Arguments.
This package contains classes related to dialog bodies in the Paper API.
The root package of the Bukkit API, contains generalized API classes.
Classes relevant to advancements.
Classes used to manipulate the voxels in a
world
,
including special states.Generalized BlockData classes.
Classes dedicated to handling a plugin's runtime configuration.
Classes relating to the specialized enhancements to
item stacks
, as part of the meta data
.Interfaces for non-voxel objects that can exist in a
world
, including all players, monsters, projectiles, etc.Events
triggered from an enchantment table
.Events
relating to entities that hang
.Classes involved in manipulating player inventories and item interactions.
The interfaces used when manipulating extra data can can be stored inside
item stacks
.Classes relevant to loot table manipulation and generation.
Classes that represents various voxel types and states.
Classes related to entity spawners.
-
Uses of ItemStack in com.destroystokyo.paper
Methods in com.destroystokyo.paper with parameters of type ItemStack -
Uses of ItemStack in com.destroystokyo.paper.event.entity
Methods in com.destroystokyo.paper.event.entity that return ItemStackModifier and TypeMethodDescriptionWitchConsumePotionEvent.getPotion()
WitchReadyPotionEvent.getPotion()
WitchThrowPotionEvent.getPotion()
Methods in com.destroystokyo.paper.event.entity with parameters of type ItemStackModifier and TypeMethodDescriptionvoid
Sets the potion to be consumed and applied to the witch.void
Sets the potion the which is going to hold and usevoid
Sets the potion to be thrown at a playerConstructors in com.destroystokyo.paper.event.entity with parameters of type ItemStackModifierConstructorDescriptionWitchConsumePotionEvent
(Witch witch, @Nullable ItemStack potion) WitchReadyPotionEvent
(Witch witch, @Nullable ItemStack potion) WitchThrowPotionEvent
(Witch witch, LivingEntity target, @Nullable ItemStack potion) -
Uses of ItemStack in com.destroystokyo.paper.event.inventory
Methods in com.destroystokyo.paper.event.inventory that return ItemStackMethods in com.destroystokyo.paper.event.inventory with parameters of type ItemStackModifier and TypeMethodDescriptionvoid
Set result item, may benull
.Constructors in com.destroystokyo.paper.event.inventory with parameters of type ItemStackModifierConstructorDescriptionPrepareGrindstoneEvent
(@NotNull InventoryView inventory, @Nullable ItemStack result) Deprecated.PrepareResultEvent
(InventoryView inventory, @Nullable ItemStack result) -
Uses of ItemStack in com.destroystokyo.paper.event.player
Methods in com.destroystokyo.paper.event.player that return ItemStackModifier and TypeMethodDescriptionPlayerReadyArrowEvent.getArrow()
PlayerReadyArrowEvent.getBow()
PlayerElytraBoostEvent.getItemStack()
Get the firework itemstack usedPlayerLaunchProjectileEvent.getItemStack()
Get the ItemStack used to fire the projectilePlayerArmorChangeEvent.getNewItem()
Gets the new item that's replacing the oldPlayerArmorChangeEvent.getOldItem()
Gets the existing item that's being replacedConstructors in com.destroystokyo.paper.event.player with parameters of type ItemStackModifierConstructorDescriptionPlayerArmorChangeEvent
(Player player, PlayerArmorChangeEvent.SlotType slotType, ItemStack oldItem, ItemStack newItem) PlayerElytraBoostEvent
(Player player, ItemStack itemStack, Firework firework, EquipmentSlot hand) PlayerLaunchProjectileEvent
(Player shooter, ItemStack itemStack, Projectile projectile) PlayerReadyArrowEvent
(Player player, ItemStack bow, ItemStack arrow) -
Uses of ItemStack in io.papermc.paper.advancement
Methods in io.papermc.paper.advancement that return ItemStack -
Uses of ItemStack in io.papermc.paper.command.brigadier.argument
Methods in io.papermc.paper.command.brigadier.argument that return types with arguments of type ItemStack -
Uses of ItemStack in io.papermc.paper.datacomponent.item
Methods in io.papermc.paper.datacomponent.item that return ItemStackModifier and TypeMethodDescriptionUseRemainder.transformInto()
The item that the item that is consumed is transformed into.Methods in io.papermc.paper.datacomponent.item that return types with arguments of type ItemStackModifier and TypeMethodDescriptionBundleContents.contents()
Lists the items that are currently stored inside of this component.ItemContainerContents.contents()
Gets the contents of the container.ChargedProjectiles.projectiles()
Lists the projectiles that are currently loaded into this component.Methods in io.papermc.paper.datacomponent.item with parameters of type ItemStackModifier and TypeMethodDescriptionAdds an item to this builder.Adds a projectile to be loaded in this builder.Adds an item stack to the container.static UseRemainder
UseRemainder.useRemainder
(ItemStack itemStack) Method parameters in io.papermc.paper.datacomponent.item with type arguments of type ItemStackModifier and TypeMethodDescriptionAdds items to this builder.Adds projectiles to be loaded in this builder.Adds item stacks to the container.static BundleContents
BundleContents.bundleContents
(List<ItemStack> contents) static ChargedProjectiles
ChargedProjectiles.chargedProjectiles
(List<ItemStack> projectiles) static ItemContainerContents
ItemContainerContents.containerContents
(List<ItemStack> contents) -
Uses of ItemStack in io.papermc.paper.entity
Methods in io.papermc.paper.entity that return ItemStackModifier and TypeMethodDescriptionBucketable.getBaseBucketItem()
Gets the base itemstack of this entity in a bucket form.Methods in io.papermc.paper.entity that return types with arguments of type ItemStackModifier and TypeMethodDescription@Unmodifiable Collection
<ItemStack> PlayerGiveResult.leftovers()
A collection of itemstacks that were not added to the player's inventory as they did not fit. -
Uses of ItemStack in io.papermc.paper.event.block
Methods in io.papermc.paper.event.block that return ItemStackModifier and TypeMethodDescriptionCompostItemEvent.getItem()
Gets the item that was used on the composter.PlayerShearBlockEvent.getItem()
Gets the item used to shear the block.BlockPreDispenseEvent.getItemStack()
Gets theItemStack
to be dispensed.BlockLockCheckEvent.getKeyItem()
Gets the itemstack that will be used as the key itemstack.Methods in io.papermc.paper.event.block that return types with arguments of type ItemStackModifier and TypeMethodDescriptionBlockBreakBlockEvent.getDrops()
Gets a mutable list of drops for this eventPlayerShearBlockEvent.getDrops()
Gets the resulting drops of this event.Methods in io.papermc.paper.event.block with parameters of type ItemStackModifier and TypeMethodDescriptionvoid
BlockLockCheckEvent.setKeyItem
(ItemStack stack) Sets the itemstack that will be used as the key item.Constructors in io.papermc.paper.event.block with parameters of type ItemStackModifierConstructorDescriptionBlockPreDispenseEvent
(Block block, ItemStack itemStack, int slot) CompostItemEvent
(Block composter, ItemStack item, boolean willRaiseLevel) PlayerShearBlockEvent
(Player player, Block block, ItemStack item, EquipmentSlot hand, List<ItemStack> drops) Constructor parameters in io.papermc.paper.event.block with type arguments of type ItemStackModifierConstructorDescriptionBlockBreakBlockEvent
(Block block, Block source, List<ItemStack> drops) PlayerShearBlockEvent
(Player player, Block block, ItemStack item, EquipmentSlot hand, List<ItemStack> drops) -
Uses of ItemStack in io.papermc.paper.event.entity
Methods in io.papermc.paper.event.entity that return ItemStackModifier and TypeMethodDescriptionEntityFertilizeEggEvent.getBredWith()
The ItemStack that was used to initiate fertilization, if present.EntityLoadCrossbowEvent.getCrossbow()
Gets the crossbowItemStack
being loaded.EntityDamageItemEvent.getItem()
Gets the item being damaged.EntityAttemptSmashAttackEvent.getWeapon()
Yields a copy of the itemstack used in the smash attack attempt.EntityEquipmentChangedEvent.EquipmentChange.newItem()
Gets the new item that is replacing the existing item.EntityEquipmentChangedEvent.EquipmentChange.oldItem()
Gets the existing item that is being replaced.Constructors in io.papermc.paper.event.entity with parameters of type ItemStackModifierConstructorDescriptionEntityAttemptSmashAttackEvent
(LivingEntity attacker, LivingEntity target, ItemStack weapon, boolean originalResult) EntityCompostItemEvent
(Entity entity, Block composter, ItemStack item, boolean willRaiseLevel) EntityDamageItemEvent
(Entity entity, ItemStack item, int damage) EntityFertilizeEggEvent
(LivingEntity mother, LivingEntity father, @Nullable Player breeder, @Nullable ItemStack bredWith, int experience) EntityLoadCrossbowEvent
(LivingEntity entity, ItemStack crossbow, EquipmentSlot hand) -
Uses of ItemStack in io.papermc.paper.event.player
Methods in io.papermc.paper.event.player that return ItemStackModifier and TypeMethodDescriptionPlayerInsertLecternBookEvent.getBook()
Returns the itemstack the player tried to insert.PlayerLecternPageChangeEvent.getBook()
Gets the current ItemStack on the lectern.PlayerMapFilledEvent.getCreatedMap()
Returns a copy of the filled map which was created.PlayerFlowerPotManipulateEvent.getItem()
Gets the item being placed, or taken from, the flower pot.PlayerStopUsingItemEvent.getItem()
Gets the exact item the player is releasingPlayerItemFrameChangeEvent.getItemStack()
Gets theItemStack
involved in this event.PlayerInventorySlotChangeEvent.getNewItemStack()
Clone of ItemStack that is in the slot after the change.PlayerInventorySlotChangeEvent.getOldItemStack()
Clone of ItemStack that was in the slot before the change.PlayerMapFilledEvent.getOriginalItem()
Returns a copy of the empty map before it was consumed.Methods in io.papermc.paper.event.player with parameters of type ItemStackModifier and TypeMethodDescriptionvoid
Sets the itemstack to insert into the lectern.void
PlayerMapFilledEvent.setCreatedMap
(ItemStack createdMap) Sets the filled map that will be created.void
PlayerItemFrameChangeEvent.setItemStack
(@Nullable ItemStack itemStack) Constructors in io.papermc.paper.event.player with parameters of type ItemStackModifierConstructorDescriptionPlayerFlowerPotManipulateEvent
(Player player, Block flowerpot, ItemStack item, boolean placing) PlayerInsertLecternBookEvent
(Player player, Block block, ItemStack book) PlayerInventorySlotChangeEvent
(Player player, int rawSlot, ItemStack oldItemStack, ItemStack newItemStack) PlayerItemFrameChangeEvent
(Player player, ItemFrame itemFrame, ItemStack itemStack, PlayerItemFrameChangeEvent.ItemFrameChangeAction action) PlayerLecternPageChangeEvent
(Player player, Lectern lectern, ItemStack book, PlayerLecternPageChangeEvent.PageChangeDirection pageChangeDirection, int oldPage, int newPage) PlayerMapFilledEvent
(Player player, ItemStack originalItem, ItemStack createdMap) PlayerStopUsingItemEvent
(Player player, ItemStack item, int ticksHeldFor) -
Uses of ItemStack in io.papermc.paper.potion
Methods in io.papermc.paper.potion that return ItemStackModifier and TypeMethodDescriptionPotionMix.getResult()
Gets the resulting itemstack after the brew has finished.Method parameters in io.papermc.paper.potion with type arguments of type ItemStackModifier and TypeMethodDescriptionstatic RecipeChoice
PotionMix.createPredicateChoice
(Predicate<? super ItemStack> stackPredicate) Create aRecipeChoice
based on a Predicate.Constructors in io.papermc.paper.potion with parameters of type ItemStackModifierConstructorDescriptionPotionMix
(NamespacedKey key, ItemStack result, RecipeChoice input, RecipeChoice ingredient) Creates a new potion mix. -
Uses of ItemStack in io.papermc.paper.registry.data.dialog
Methods in io.papermc.paper.registry.data.dialog with parameters of type ItemStackModifier and TypeMethodDescriptionDialogInstancesProvider.itemDialogBodyBuilder
(ItemStack itemStack) -
Uses of ItemStack in io.papermc.paper.registry.data.dialog.body
Methods in io.papermc.paper.registry.data.dialog.body that return ItemStackMethods in io.papermc.paper.registry.data.dialog.body with parameters of type ItemStackModifier and TypeMethodDescriptionstatic ItemDialogBody.Builder
Creates a new item dialog body builder.static ItemDialogBody
DialogBody.item
(ItemStack item, @Nullable PlainMessageDialogBody description, boolean showDecorations, boolean showTooltip, @org.jetbrains.annotations.Range(from=1L, to=256L) int width, @org.jetbrains.annotations.Range(from=1L, to=256L) int height) Creates an item body for a dialog. -
Uses of ItemStack in org.bukkit
Methods in org.bukkit that return ItemStackModifier and TypeMethodDescriptionstatic @NotNull ItemStack
Get the crafted item using the list ofItemStack
provided.static @NotNull ItemStack
Bukkit.craftItem
(@NotNull ItemStack @NotNull [] craftingMatrix, @NotNull World world, @NotNull Player player) Get the crafted item using the list ofItemStack
provided.default @NotNull ItemStack
Get the crafted item using the list ofItemStack
provided.default @NotNull ItemStack
Server.craftItem
(@NotNull ItemStack @NotNull [] craftingMatrix, @NotNull World world, @NotNull Player player) Get the crafted item using the list ofItemStack
provided.UnsafeValues.createEmptyStack()
Deprecated.static @NotNull ItemStack
Bukkit.createExplorerMap
(@NotNull World world, @NotNull Location location, @NotNull StructureType structureType) Deprecated.static @NotNull ItemStack
Bukkit.createExplorerMap
(@NotNull World world, @NotNull Location location, @NotNull StructureType structureType, int radius, boolean findUnexplored) static @Nullable ItemStack
Bukkit.createExplorerMap
(@NotNull World world, @NotNull Location location, StructureType structureType, MapCursor.Type mapIcon) Create a new explorer map targeting the closest nearby structure of a givenStructureType
.static @Nullable ItemStack
Bukkit.createExplorerMap
(@NotNull World world, @NotNull Location location, StructureType structureType, MapCursor.Type mapIcon, int radius, boolean findUnexplored) Create a new explorer map targeting the closest nearby structure of a givenStructureType
.default @NotNull ItemStack
Server.createExplorerMap
(@NotNull World world, @NotNull Location location, @NotNull StructureType structureType) @NotNull ItemStack
Server.createExplorerMap
(@NotNull World world, @NotNull Location location, @NotNull StructureType structureType, int radius, boolean findUnexplored) default @Nullable ItemStack
Server.createExplorerMap
(@NotNull World world, @NotNull Location location, StructureType structureType, MapCursor.Type mapIcon) Create a new explorer map targeting the closest nearby structure of a givenStructureType
.@Nullable ItemStack
Server.createExplorerMap
(@NotNull World world, @NotNull Location location, StructureType structureType, MapCursor.Type mapIcon, int radius, boolean findUnexplored) Create a new explorer map targeting the closest nearby structure of a givenStructureType
.UnsafeValues.deserializeItem
(byte[] data) Deprecated.@NotNull ItemStack
UnsafeValues.deserializeItemFromJson
(com.google.gson.JsonObject data) Deprecated.Creates an itemstack from a json object.@NotNull ItemStack
UnsafeValues.deserializeStack
(@NotNull Map<String, Object> args) Deprecated.UnsafeValues.modifyItemStack
(ItemStack stack, String arguments) Deprecated.Methods in org.bukkit with parameters of type ItemStackModifier and TypeMethodDescriptionUnsafeValues.computeTooltipLines
(@NotNull ItemStack itemStack, TooltipContext tooltipContext, Player player) Deprecated.static @NotNull ItemStack
Get the crafted item using the list ofItemStack
provided.static @NotNull ItemStack
Bukkit.craftItem
(@NotNull ItemStack @NotNull [] craftingMatrix, @NotNull World world, @NotNull Player player) Get the crafted item using the list ofItemStack
provided.default @NotNull ItemStack
Get the crafted item using the list ofItemStack
provided.default @NotNull ItemStack
Server.craftItem
(@NotNull ItemStack @NotNull [] craftingMatrix, @NotNull World world, @NotNull Player player) Get the crafted item using the list ofItemStack
provided.static @NotNull ItemCraftResult
Bukkit.craftItemResult
(@NotNull ItemStack @NotNull [] craftingMatrix, @NotNull World world) Get the crafted item using the list ofItemStack
provided.static @NotNull ItemCraftResult
Bukkit.craftItemResult
(@NotNull ItemStack @NotNull [] craftingMatrix, @NotNull World world, @NotNull Player player) Get the crafted item using the list ofItemStack
provided.@NotNull ItemCraftResult
Server.craftItemResult
(@NotNull ItemStack @NotNull [] craftingMatrix, @NotNull World world) Get the crafted item using the list ofItemStack
provided.@NotNull ItemCraftResult
Server.craftItemResult
(@NotNull ItemStack @NotNull [] craftingMatrix, @NotNull World world, @NotNull Player player) Get the crafted item using the list ofItemStack
provided.default @NotNull Item
Drops an item at the specifiedLocation
@NotNull Item
World.dropItem
(@NotNull Location location, @NotNull ItemStack item, @Nullable Consumer<? super Item> function) Drops an item at the specifiedLocation
Note that functions will run before the entity is spawneddefault @NotNull Item
World.dropItemNaturally
(@NotNull Location location, @NotNull ItemStack item) Drops an item at the specifiedLocation
with a random offset@NotNull Item
World.dropItemNaturally
(@NotNull Location location, @NotNull ItemStack item, @Nullable Consumer<? super Item> function) Drops an item at the specifiedLocation
with a random offset Note that functions will run before the entity is spawnedstatic @Nullable Recipe
Bukkit.getCraftingRecipe
(@NotNull ItemStack @NotNull [] craftingMatrix, @NotNull World world) Get theRecipe
for the list of ItemStacks provided.@Nullable Recipe
Server.getCraftingRecipe
(@NotNull ItemStack @NotNull [] craftingMatrix, @NotNull World world) Get theRecipe
for the list of ItemStacks provided.Bukkit.getRecipesFor
(@NotNull ItemStack result) Get a list of all recipes for a given item.Server.getRecipesFor
(@NotNull ItemStack result) Get a list of all recipes for a given item.UnsafeValues.getTranslationKey
(ItemStack itemStack) Deprecated.boolean
UnsafeValues.isValidRepairItemStack
(@NotNull ItemStack itemToBeRepaired, @NotNull ItemStack repairMaterial) Deprecated.Checks if an itemstack can be repaired with another itemstack.UnsafeValues.modifyItemStack
(ItemStack stack, String arguments) Deprecated.byte[]
UnsafeValues.serializeItem
(ItemStack item) Deprecated.com.google.gson.JsonObject
UnsafeValues.serializeItemAsJson
(@NotNull ItemStack itemStack) Deprecated.Serializes this itemstack to json format.UnsafeValues.serializeStack
(ItemStack itemStack) Deprecated. -
Uses of ItemStack in org.bukkit.advancement
Methods in org.bukkit.advancement that return ItemStack -
Uses of ItemStack in org.bukkit.block
Methods in org.bukkit.block that return ItemStackModifier and TypeMethodDescriptionVault.getDisplayedItem()
Gets the item currently being displayed inside this vault.@NotNull ItemStack
BrushableBlock.getItem()
Get the item which will be revealed when the sand is fully brushed away and uncovered.@Nullable ItemStack
Campfire.getItem
(int index) Vault.getKeyItem()
Gets theItemStack
that players must use to unlock this vault.@NotNull ItemStack
Jukebox.getRecord()
Gets the record item inserted into the jukebox.Methods in org.bukkit.block that return types with arguments of type ItemStackModifier and TypeMethodDescription@NotNull Collection
<ItemStack> Block.getDrops()
Returns a list of items which could drop by destroying this block.@NotNull Collection
<ItemStack> Returns a list of items which could drop by destroying this block with a specific tool.@NotNull Collection
<ItemStack> Returns a list of items which could drop by the entity destroying this block with a specific tool.default @NotNull @Unmodifiable Collection
<ItemStack> BlockState.getDrops()
Returns an immutable list of items which would drop by destroying this block state.default @NotNull @Unmodifiable Collection
<ItemStack> Returns an immutable list of items which would drop by destroying this block state with a specific tool@NotNull @Unmodifiable Collection
<ItemStack> Returns an immutable list of items which would drop by the entity destroying this block state with a specific toolMethods in org.bukkit.block with parameters of type ItemStackModifier and TypeMethodDescriptiondefault 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 toolboolean
Block.breakNaturally
(@NotNull ItemStack tool, boolean triggerEffect, boolean dropExperience) Breaks the block and spawns item drops as if a player had broken it with a specific toolboolean
Block.breakNaturally
(@NotNull ItemStack tool, boolean triggerEffect, boolean dropExperience, boolean forceEffect) Breaks the block and spawns item drops as if a player had broken it with a specific toolboolean
Block.breakNaturally
(@Nullable ItemStack tool) Breaks the block and spawns items as if a player had digged it with a specific tooldefault float
Block.getDestroySpeed
(@NotNull ItemStack itemStack) Gets the speed at which this block will be destroyed by a givenItemStack
default float
Block.getDestroySpeed
(@NotNull ItemStack itemStack, boolean considerEnchants) Gets the speed at which this block will be destroyed by a givenItemStack
@NotNull Collection
<ItemStack> Returns a list of items which could drop by destroying this block with a specific tool.@NotNull Collection
<ItemStack> Returns a list of items which could drop by the entity destroying this block with a specific tool.default @NotNull @Unmodifiable Collection
<ItemStack> Returns an immutable list of items which would drop by destroying this block state with a specific tool@NotNull @Unmodifiable Collection
<ItemStack> Returns an immutable list of items which would drop by the entity destroying this block state with a specific toolboolean
Block.isPreferredTool
(@NotNull ItemStack tool) Returns if the given item is a preferred choice to break this Block.boolean
Block.isValidTool
(@NotNull ItemStack itemStack) Deprecated, for removal: This API element is subject to removal in a future version.partially replaced byBlock.isPreferredTool(ItemStack)
void
Vault.setDisplayedItem
(ItemStack displayedItem) Sets the item to display inside this vault until the next cycle.void
Sets the item which will be revealed when the sand is fully brushed away and uncovered.void
void
Vault.setKeyItem
(ItemStack key) Sets theItemStack
that players must use to unlock this vault.void
Lockable.setLockItem
(@Nullable ItemStack key) Sets the key required to access this container.void
Sets the record being played. -
Uses of ItemStack in org.bukkit.block.data
Methods in org.bukkit.block.data with parameters of type ItemStackModifier and TypeMethodDescriptiondefault float
BlockData.getDestroySpeed
(@NotNull ItemStack itemStack) Gets the speed at which this block will be destroyed by a givenItemStack
float
BlockData.getDestroySpeed
(@NotNull ItemStack itemStack, boolean considerEnchants) Gets the speed at which this block will be destroyed by a givenItemStack
boolean
BlockData.isPreferredTool
(@NotNull 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 ItemStackModifier and TypeMethodDescription@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 requestedItemStack
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 ItemStackModifier and TypeMethodDescription@Nullable ItemStack
ConfigurationSection.getItemStack
(@NotNull String path, @Nullable ItemStack def) Gets the requestedItemStack
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 ItemStackModifier and TypeMethodDescriptionabstract boolean
Enchantment.canEnchantItem
(@NotNull ItemStack item) Checks if this Enchantment may be applied to the givenItemStack
.boolean
Deprecated, for removal: This API element is subject to removal in a future version.Check whether this target includes the specified item. -
Uses of ItemStack in org.bukkit.entity
Methods in org.bukkit.entity that return ItemStackModifier and TypeMethodDescription@NotNull ItemStack
LivingEntity.damageItemStack
(@NotNull ItemStack stack, int amount) Damages the itemstack in this slot by the specified amount.@NotNull ItemStack
LivingEntity.getActiveItem()
Gets the item being actively "used" or consumed.@NotNull ItemStack
ArmorStand.getBoots()
Deprecated.preferEntityEquipment.getBoots()
@NotNull ItemStack
ArmorStand.getChestplate()
Deprecated.@NotNull ItemStack
SizedFireball.getDisplayItem()
Gets the displayItemStack
.@NotNull ItemStack
Witch.getDrinkingPotion()
Get the potion the Witch is drinking@NotNull ItemStack
ArmorStand.getHelmet()
Deprecated.preferEntityEquipment.getHelmet()
@NotNull ItemStack
AbstractArrow.getItem()
Deprecated, for removal: This API element is subject to removal in a future version.@NotNull ItemStack
ArmorStand.getItem
(EquipmentSlot slot) Returns the item the armor stand has equipped in the given equipment slot@NotNull ItemStack
EnderSignal.getItem()
Get theItemStack
to be displayed while in the air and to be dropped on death.Firework.getItem()
Gets the item used in the firework.@NotNull ItemStack
ItemFrame.getItem()
Get the item in this frame@NotNull ItemStack
OminousItemSpawner.getItem()
Gets the item which will be spawned by this spawner.@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.HumanEntity.getItemInHand()
Deprecated.Humans may now dual wield in their off hand, use explicit methods inPlayerInventory
.@Nullable ItemStack
LivingEntity.getItemInUse()
Deprecated, for removal: This API element is subject to removal in a future version.HumanEntity.getItemOnCursor()
Returns the ItemStack currently on your cursor, can be empty.@NotNull ItemStack
AbstractArrow.getItemStack()
Gets theItemStack
for this arrow.@NotNull ItemStack
Item.getItemStack()
Gets the item stack associated with this item drop.@NotNull ItemStack
ItemDisplay.getItemStack()
Gets the displayed item stack.@NotNull ItemStack
ArmorStand.getLeggings()
Deprecated.@NotNull ItemStack
Entity.getPickItemStack()
Gets theItemStack
that a player would select / create (in creative mode) when using the pick block action on this entity.@Nullable ItemStack
AbstractArrow.getWeapon()
Gets the ItemStack which fired this arrow.Methods in org.bukkit.entity with parameters of type ItemStackModifier and TypeMethodDescriptionPlayer.boostElytra
(ItemStack firework) Deprecated.useHumanEntity.fireworkBoost(ItemStack)
instead.@NotNull ItemStack
LivingEntity.damageItemStack
(@NotNull ItemStack stack, int amount) Damages the itemstack in this slot by the specified amount.Makes the player drop any arbitraryItemStack
, independently of whether the player actually has that item in their inventory.HumanEntity.dropItem
(ItemStack itemStack, boolean throwRandomly, @Nullable Consumer<Item> entityOperation) Makes the player drop any arbitraryItemStack
, independently of whether the player actually has that item in their inventory.HumanEntity.fireworkBoost
(ItemStack fireworkItemStack) Perform a firework boost.int
HumanEntity.getCooldown
(ItemStack item) Get the cooldown time in ticks remaining for the specified item.@NotNull Sound
LivingEntity.getDrinkingSound
(@NotNull ItemStack itemStack) @NotNull Sound
LivingEntity.getEatingSound
(@NotNull ItemStack itemStack) default PlayerGiveResult
Gives the player the items following full vanilla logic, making the player drop the items that did not fit into the inventory.boolean
HumanEntity.hasCooldown
(ItemStack item) Check whether a cooldown is active on the specified item.boolean
Animals.isBreedItem
(@NotNull ItemStack stack) Check if the provided ItemStack is the correct item used for breeding this entity.void
Open aMaterial.WRITTEN_BOOK
for a Playervoid
Player.sendEquipmentChange
(LivingEntity entity, EquipmentSlot slot, @Nullable ItemStack item) Send an equipment change for the target entity.void
Deprecated.void
ArmorStand.setChestplate
(@Nullable ItemStack item) Deprecated.void
HumanEntity.setCooldown
(ItemStack item, int ticks) Set a cooldown on the specified item for a certain amount of ticks.void
SizedFireball.setDisplayItem
(@NotNull ItemStack item) Sets the displayItemStack
for the fireball.void
Witch.setDrinkingPotion
(@Nullable ItemStack potion) Set the potion the Witch should drinkvoid
Deprecated.void
Deprecated, for removal: This API element is subject to removal in a future version.void
ArmorStand.setItem
(EquipmentSlot slot, @Nullable ItemStack item) Sets the item the armor stand has equipped in the given equipment slotvoid
Set theItemStack
to be displayed while in the air and to be dropped on death.void
Sets the item used in the firework.void
Set the item in this framevoid
Set the item in this framevoid
Sets the item which will be spawned by this spawner.void
Sets the display ItemStack for the thrown projectile.void
Set the ItemStack for this thrown potion.void
ArmorStand.setItemInHand
(@Nullable ItemStack item) Deprecated.void
HumanEntity.setItemInHand
(@Nullable ItemStack item) Deprecated.Humans may now dual wield in their off hand, use explicit methods inPlayerInventory
.void
HumanEntity.setItemOnCursor
(@Nullable ItemStack item) Sets the item to the given ItemStack, this will replace whatever the user was moving.void
AbstractArrow.setItemStack
(@NotNull ItemStack stack) Sets theItemStack
for this arrow.void
Item.setItemStack
(@NotNull ItemStack stack) Sets the item stack associated with this item drop.void
ItemDisplay.setItemStack
(@Nullable ItemStack item) Sets the displayed item stack.void
ArmorStand.setLeggings
(@Nullable ItemStack item) Deprecated.void
Sets the ItemStack which fired this arrow.void
HumanEntity.startRiptideAttack
(int duration, float attackStrength, @Nullable ItemStack attackItem) Make the player start a riptide spin attack.Method parameters in org.bukkit.entity with type arguments of type ItemStackModifier and TypeMethodDescriptiondefault PlayerGiveResult
Player.give
(Collection<ItemStack> items) Gives the player those items following full vanilla logic, making the player drop the items that did not fit into the inventory.Player.give
(Collection<ItemStack> items, boolean dropIfFull) Gives the player those items following full vanilla logic.void
Player.sendEquipmentChange
(LivingEntity entity, Map<EquipmentSlot, @Nullable ItemStack> items) Send multiple equipment changes for the target entity. -
Uses of ItemStack in org.bukkit.event.block
Fields in org.bukkit.event.block declared as ItemStackModifier and TypeFieldDescriptionprotected ItemStack
BlockPlaceEvent.itemInHand
protected ItemStack
InventoryBlockStartEvent.source
Methods in org.bukkit.event.block that return ItemStackModifier and TypeMethodDescription@Nullable ItemStack
VaultDisplayItemEvent.getDisplayItem()
Gets the item that will be displayed inside the vault.@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
CrafterCraftEvent.getResult()
Gets the result for the craft.@NotNull ItemStack
BlockCookEvent.getSource()
Gets the smelted ItemStack for this event@NotNull ItemStack
InventoryBlockStartEvent.getSource()
Gets the source ItemStack for this event.@NotNull ItemStack
BlockShearEntityEvent.getTool()
Gets the item used to shear this sheep.Methods in org.bukkit.event.block that return types with arguments of type ItemStackModifier and TypeMethodDescriptionBlockDispenseLootEvent.getDispensedLoot()
Gets the loot that will be dispensed.BlockShearEntityEvent.getDrops()
Get an immutable list of drops for this shearing.Methods in org.bukkit.event.block with parameters of type ItemStackModifier and TypeMethodDescriptionvoid
VaultDisplayItemEvent.setDisplayItem
(@Nullable ItemStack displayItem) Sets the item that will be displayed inside the vault.void
Sets the item being dispensed.void
Sets the resultant ItemStack for this eventvoid
Sets the result of the craft.Method parameters in org.bukkit.event.block with type arguments of type ItemStackModifier and TypeMethodDescriptionvoid
BlockDispenseLootEvent.setDispensedLoot
(@Nullable List<ItemStack> dispensedLoot) Sets the loot that will be dispensed.void
Sets the drops for the shearing.Constructors in org.bukkit.event.block with parameters of type ItemStackModifierConstructorDescriptionBlockCookEvent
(@NotNull Block block, @NotNull ItemStack source, @NotNull ItemStack result) Deprecated, for removal: This API element is subject to removal in a future version.BlockCookEvent
(@NotNull Block block, @NotNull ItemStack source, @NotNull ItemStack result, @Nullable CookingRecipe<?> recipe) BlockDamageAbortEvent
(@NotNull Player player, @NotNull Block block, @NotNull ItemStack itemInHand) BlockDamageEvent
(@NotNull Player player, @NotNull Block block, @NotNull BlockFace blockFace, @NotNull ItemStack itemInHand, boolean instaBreak) BlockDamageEvent
(@NotNull Player player, @NotNull Block block, @NotNull ItemStack itemInHand, boolean instaBreak) Deprecated, for removal: This API element is subject to removal in a future version.BlockDispenseArmorEvent
(@NotNull Block block, @NotNull ItemStack dispensed, @NotNull LivingEntity target) BlockDispenseEvent
(@NotNull Block block, @NotNull ItemStack item, @NotNull Vector velocity) BlockMultiPlaceEvent
(@NotNull List<BlockState> states, @NotNull Block clicked, @NotNull ItemStack itemInHand, @NotNull Player thePlayer, boolean canBuild) Deprecated, for removal: This API element is subject to removal in a future version.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, for removal: This API element is subject to removal in a future version.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, @NotNull List<ItemStack> drops) BrewingStartEvent
(@NotNull Block brewingStand, @NotNull ItemStack source, int brewingTime) CampfireStartEvent
(@NotNull Block campfire, @NotNull ItemStack source, @NotNull CampfireRecipe recipe) CrafterCraftEvent
(@NotNull Block crafter, @NotNull CraftingRecipe recipe, @NotNull ItemStack result) InventoryBlockStartEvent
(@NotNull Block block, @NotNull ItemStack source) VaultDisplayItemEvent
(@NotNull Block vault, @Nullable ItemStack displayItem) Constructor parameters in org.bukkit.event.block with type arguments of type ItemStackModifierConstructorDescriptionBlockDispenseLootEvent
(@Nullable Player player, @NotNull Block block, @NotNull List<ItemStack> dispensedLoot, @NotNull LootTable lootTable) BlockShearEntityEvent
(@NotNull Block dispenser, @NotNull Entity sheared, @NotNull ItemStack tool, @NotNull List<ItemStack> drops) -
Uses of ItemStack in org.bukkit.event.enchantment
Methods in org.bukkit.event.enchantment that return ItemStackModifier and TypeMethodDescription@NotNull ItemStack
EnchantItemEvent.getItem()
Gets the item to be enchanted (can be modified)@NotNull ItemStack
PrepareItemEnchantEvent.getItem()
Gets the item to be enchanted.Methods in org.bukkit.event.enchantment with parameters of type ItemStackModifier and TypeMethodDescriptionvoid
Sets the item to be enchantedConstructors in org.bukkit.event.enchantment with parameters of type ItemStackModifierConstructorDescriptionEnchantItemEvent
(@NotNull Player enchanter, @NotNull InventoryView view, @NotNull Block table, @NotNull ItemStack item, int level, @NotNull Map<Enchantment, Integer> enchants, @NotNull Enchantment enchantmentHint, int levelHint, int button) PrepareItemEnchantEvent
(@NotNull Player enchanter, @NotNull EnchantmentView 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 ItemStackModifier and TypeMethodDescription@Nullable 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 ItemStackModifier and TypeMethodDescriptionEntityDeathEvent.getDrops()
Gets all the items which will drop when the entity diesPlayerDeathEvent.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!PiglinBarterEvent.getOutcome()
Returns a mutable list representing the outcome of the barter.Constructors in org.bukkit.event.entity with parameters of type ItemStackModifierConstructorDescriptionEntityBreedEvent
(@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, for removal: This API element is subject to removal in a future version.EntityShootBowEvent
(@NotNull LivingEntity shooter, @Nullable ItemStack bow, @NotNull ItemStack arrowItem, @NotNull Entity projectile, float force) Deprecated, for removal: This API element is subject to removal in a future version.EntityShootBowEvent
(@NotNull LivingEntity shooter, @Nullable ItemStack bow, @Nullable ItemStack consumable, @NotNull Entity projectile, @NotNull EquipmentSlot hand, float force, boolean consumeItem) FoodLevelChangeEvent
(@NotNull HumanEntity human, int level, @Nullable ItemStack item) PiglinBarterEvent
(@NotNull Piglin piglin, @NotNull ItemStack input, @NotNull List<ItemStack> outcome) Constructor parameters in org.bukkit.event.entity with type arguments of type ItemStackModifierConstructorDescriptionEntityDeathEvent
(@NotNull LivingEntity livingEntity, @NotNull DamageSource damageSource, @NotNull List<ItemStack> drops) EntityDeathEvent
(@NotNull LivingEntity livingEntity, @NotNull DamageSource damageSource, @NotNull List<ItemStack> drops, int droppedExp) PiglinBarterEvent
(@NotNull Piglin piglin, @NotNull ItemStack input, @NotNull List<ItemStack> outcome) PlayerDeathEvent
(@NotNull Player player, @NotNull DamageSource damageSource, @NotNull List<ItemStack> drops, int droppedExp, int newExp, int newTotalExp, int newLevel, @Nullable String deathMessage) Deprecated, for removal: This API element is subject to removal in a future version.PlayerDeathEvent
(@NotNull Player player, @NotNull DamageSource damageSource, @NotNull List<ItemStack> drops, int droppedExp, int newExp, int newTotalExp, int newLevel, @Nullable String deathMessage, boolean doExpDrop) Deprecated, for removal: This API element is subject to removal in a future version.PlayerDeathEvent
(@NotNull Player player, @NotNull DamageSource damageSource, @NotNull List<ItemStack> drops, int droppedExp, int newExp, int newTotalExp, int newLevel, @Nullable Component deathMessage, boolean showDeathMessages) PlayerDeathEvent
(@NotNull Player player, @NotNull DamageSource damageSource, @NotNull List<ItemStack> drops, int droppedExp, int newExp, int newTotalExp, int newLevel, @Nullable Component deathMessage, boolean showDeathMessages, boolean doExpDrop) PlayerDeathEvent
(@NotNull Player player, @NotNull DamageSource damageSource, @NotNull List<ItemStack> drops, int droppedExp, int newExp, @Nullable String deathMessage) Deprecated, for removal: This API element is subject to removal in a future version.PlayerDeathEvent
(@NotNull Player player, @NotNull DamageSource damageSource, @NotNull List<ItemStack> drops, int droppedExp, int newExp, @Nullable Component deathMessage, boolean showDeathMessages) PlayerDeathEvent
(@NotNull Player player, @NotNull DamageSource damageSource, @NotNull List<ItemStack> drops, int droppedExp, @Nullable String deathMessage) Deprecated, for removal: This API element is subject to removal in a future version.PlayerDeathEvent
(@NotNull Player player, @NotNull DamageSource damageSource, @NotNull List<ItemStack> drops, int droppedExp, @Nullable Component deathMessage, boolean showDeathMessages) -
Uses of ItemStack in org.bukkit.event.hanging
Methods in org.bukkit.event.hanging that return ItemStackModifier and TypeMethodDescription@Nullable ItemStack
HangingPlaceEvent.getItemStack()
Gets the item from which the hanging entity originatedConstructors in org.bukkit.event.hanging with parameters of type ItemStackModifierConstructorDescriptionHangingPlaceEvent
(@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 ItemStackModifier and TypeMethodDescription@Nullable ItemStack
InventoryClickEvent.getCurrentItem()
Gets the ItemStack currently in the clicked slot.@NotNull 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
PrepareInventoryResultEvent.getResult()
Deprecated.Get result item, may benull
.Methods in org.bukkit.event.inventory that return types with arguments of type ItemStackModifier and TypeMethodDescriptionInventoryDragEvent.getNewItems()
Gets all items to be added to the inventory in this drag.BrewEvent.getResults()
Gets the resulting items in the Brewing Stand.Methods in org.bukkit.event.inventory with parameters of type ItemStackModifier and TypeMethodDescriptionvoid
InventoryClickEvent.setCurrentItem
(@Nullable ItemStack stack) Sets the ItemStack currently in the clicked slot.void
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
void
Sets the result cursor after the drag is done.void
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
Set result item, may benull
.void
Deprecated.Set result item, may benull
.Constructors in org.bukkit.event.inventory with parameters of type ItemStackModifierConstructorDescriptionBrewingStandFuelEvent
(@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, for removal: This API element is subject to removal in a future version.FurnaceSmeltEvent
(@NotNull Block furnace, @NotNull ItemStack source, @NotNull ItemStack result, CookingRecipe<?> recipe) FurnaceStartSmeltEvent
(@NotNull Block furnace, @NotNull ItemStack source, @NotNull CookingRecipe<?> recipe) Deprecated, for removal: This API element is subject to removal in a future version.FurnaceStartSmeltEvent
(@NotNull Block furnace, @NotNull ItemStack source, @NotNull CookingRecipe<?> recipe, int cookingTime) InventoryCreativeEvent
(@NotNull InventoryView view, @NotNull InventoryType.SlotType type, int slot, @NotNull ItemStack newItem) InventoryDragEvent
(@NotNull InventoryView view, @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 AnvilView inventory, @Nullable ItemStack result) PrepareGrindstoneEvent
(@NotNull InventoryView inventory, @Nullable ItemStack result) PrepareInventoryResultEvent
(@NotNull InventoryView inventory, @Nullable ItemStack result) Deprecated.PrepareSmithingEvent
(@NotNull InventoryView inventory, @Nullable ItemStack result) Constructor parameters in org.bukkit.event.inventory with type arguments of type ItemStackModifierConstructorDescriptionBrewEvent
(@NotNull Block brewer, @NotNull BrewerInventory contents, @NotNull List<ItemStack> results, int fuelLevel) InventoryDragEvent
(@NotNull InventoryView view, @Nullable ItemStack newCursor, @NotNull ItemStack oldCursor, boolean right, @NotNull Map<Integer, ItemStack> slots) -
Uses of ItemStack in org.bukkit.event.player
Methods in org.bukkit.event.player that return ItemStackModifier and TypeMethodDescription@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 theEntity
will be put into.@NotNull ItemStack
PlayerBucketFishEvent.getFishBucket()
Deprecated.@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 theItemStack
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@NotNull ItemStack
PlayerSwapHandItemsEvent.getMainHandItem()
Gets the item switched to the main hand.@NotNull ItemStack
PlayerSwapHandItemsEvent.getOffHandItem()
Gets the item switched to the off-hand.@NotNull ItemStack
PlayerBucketEntityEvent.getOriginalBucket()
Gets the bucket used to capture theEntity
.@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, ornull
if no custom replacement has been set (which means the default replacement will be used).@NotNull ItemStack
PlayerBucketFishEvent.getWaterBucket()
Deprecated.Methods in org.bukkit.event.player that return types with arguments of type ItemStackModifier and TypeMethodDescriptionPlayerShearEntityEvent.getDrops()
Get an immutable list of drops for this shearing.PlayerHarvestBlockEvent.getItemsHarvested()
Gets a list of items that are being harvested from this block.Methods in org.bukkit.event.player with parameters of type ItemStackModifier and TypeMethodDescriptionvoid
Set the item being consumedvoid
PlayerBucketEvent.setItemStack
(@Nullable ItemStack itemStack) Set the item in hand after the eventvoid
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.Method parameters in org.bukkit.event.player with type arguments of type ItemStackModifier and TypeMethodDescriptionvoid
Sets the drops for the shearing.Constructors in org.bukkit.event.player with parameters of type ItemStackModifierConstructorDescriptionPlayerArmorStandManipulateEvent
(@NotNull Player player, @NotNull ArmorStand clickedEntity, @NotNull ItemStack playerItem, @NotNull ItemStack armorStandItem, @NotNull EquipmentSlot slot) Deprecated, for removal: This API element is subject to removal in a future version.PlayerArmorStandManipulateEvent
(@NotNull Player player, @NotNull ArmorStand clickedEntity, @NotNull ItemStack playerItem, @NotNull ItemStack armorStandItem, @NotNull EquipmentSlot slot, @NotNull EquipmentSlot hand) PlayerBucketEmptyEvent
(@NotNull Player player, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand) Deprecated, for removal: This API element is subject to removal in a future version.PlayerBucketEmptyEvent
(@NotNull Player player, @NotNull Block block, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand) Deprecated, for removal: This API element is subject to removal in a future version.PlayerBucketEmptyEvent
(@NotNull Player player, @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 player, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand) Deprecated, for removal: This API element is subject to removal in a future version.PlayerBucketEvent
(@NotNull Player player, @NotNull Block block, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand) Deprecated, for removal: This API element is subject to removal in a future version.PlayerBucketEvent
(@NotNull Player player, @NotNull Block block, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand, @NotNull EquipmentSlot hand) PlayerBucketFillEvent
(@NotNull Player player, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand) Deprecated, for removal: This API element is subject to removal in a future version.PlayerBucketFillEvent
(@NotNull Player player, @NotNull Block block, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand) Deprecated, for removal: This API element is subject to removal in a future version.PlayerBucketFillEvent
(@NotNull Player player, @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 player, @NotNull Action action, @Nullable ItemStack item, @Nullable Block clickedBlock, @NotNull BlockFace clickedFace) PlayerInteractEvent
(@NotNull Player player, @NotNull Action action, @Nullable ItemStack item, @Nullable Block clickedBlock, @NotNull BlockFace clickedFace, @Nullable EquipmentSlot hand) PlayerInteractEvent
(@NotNull Player player, @NotNull Action action, @Nullable ItemStack item, @Nullable Block clickedBlock, @NotNull BlockFace clickedFace, @Nullable EquipmentSlot hand, @Nullable Vector clickedPosition) PlayerItemBreakEvent
(@NotNull Player player, @NotNull ItemStack brokenItem) PlayerItemConsumeEvent
(@NotNull Player player, @NotNull ItemStack item) Deprecated, for removal: This API element is subject to removal in a future version.PlayerItemConsumeEvent
(@NotNull Player player, @NotNull ItemStack item, @NotNull EquipmentSlot hand) PlayerItemDamageEvent
(@NotNull Player player, @NotNull ItemStack item, int damage) Deprecated, for removal: This API element is subject to removal in a future version.PlayerItemDamageEvent
(@NotNull Player player, @NotNull ItemStack item, int damage, int originalDamage) PlayerItemMendEvent
(@NotNull Player player, @NotNull ItemStack item, @NotNull ExperienceOrb experienceOrb, int repairAmount) Deprecated, for removal: This API element is subject to removal in a future version.PlayerItemMendEvent
(@NotNull Player player, @NotNull ItemStack item, @NotNull EquipmentSlot slot, @NotNull ExperienceOrb experienceOrb, int repairAmount) Deprecated, for removal: This API element is subject to removal in a future version.PlayerItemMendEvent
(@NotNull Player player, @NotNull ItemStack item, @NotNull EquipmentSlot slot, @NotNull ExperienceOrb experienceOrb, int repairAmount, int consumedExperience) PlayerRiptideEvent
(@NotNull Player player, @NotNull ItemStack item) Deprecated, for removal: This API element is subject to removal in a future version.PlayerRiptideEvent
(@NotNull Player player, @NotNull ItemStack item, @NotNull Vector velocity) PlayerShearEntityEvent
(@NotNull Player player, @NotNull Entity entity, @NotNull ItemStack item, @NotNull EquipmentSlot hand, @NotNull List<ItemStack> drops) PlayerSwapHandItemsEvent
(@NotNull Player player, @NotNull ItemStack mainHandItem, @NotNull ItemStack offHandItem) Constructor parameters in org.bukkit.event.player with type arguments of type ItemStackModifierConstructorDescriptionPlayerHarvestBlockEvent
(@NotNull Player player, @NotNull Block harvestedBlock, @NotNull List<ItemStack> itemsHarvested) Deprecated, for removal: This API element is subject to removal in a future version.PlayerHarvestBlockEvent
(@NotNull Player player, @NotNull Block harvestedBlock, @NotNull EquipmentSlot hand, @NotNull List<ItemStack> itemsHarvested) PlayerShearEntityEvent
(@NotNull Player player, @NotNull Entity entity, @NotNull ItemStack item, @NotNull EquipmentSlot hand, @NotNull List<ItemStack> drops) -
Uses of ItemStack in org.bukkit.event.world
Methods in org.bukkit.event.world that return types with arguments of type ItemStackModifier and TypeMethodDescriptionLootGenerateEvent.getLoot()
Get a mutable list of all loot to be generated.Method parameters in org.bukkit.event.world with type arguments of type ItemStackModifier and TypeMethodDescriptionvoid
LootGenerateEvent.setLoot
(@Nullable Collection<ItemStack> loot) Set the loot to be generated.Constructor parameters in org.bukkit.event.world with type arguments of type ItemStackModifierConstructorDescriptionLootGenerateEvent
(@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 ItemStackModifier and TypeMethodDescription@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 quantityprotected static @NotNull ItemStack
CraftingRecipe.checkResult
(@NotNull ItemStack result) Checks an ItemStack to be used in constructors related to CraftingRecipe is not empty.@NotNull ItemStack
ItemStack.clone()
@NotNull ItemStack
ItemFactory.createItemStack
(@NotNull String input) Create a newItemStack
given the supplied input.ItemType.createItemStack()
Constructs a new itemstack with this item type that has the amount 1.ItemType.createItemStack
(int amount) Constructs a new itemstack with this item type.ItemType.Typed.createItemStack
(int amount, @Nullable Consumer<? super M> metaConfigurator) Constructs a new item stack with this item type.ItemType.Typed.createItemStack
(@Nullable Consumer<? super M> metaConfigurator) Constructs a new item stack with this item type with the amount 1.@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 serializationstatic @NotNull ItemStack
ItemStack.deserializeBytes
(byte @NotNull [] bytes) Deserializes this itemstack from raw NBT bytes.static @NotNull ItemStack @NotNull []
ItemStack.deserializeItemsFromBytes
(byte @NotNull [] bytes) Deserializes this itemstack from raw NBT bytes.static @NotNull ItemStack
ItemStack.empty()
Returns an empty item stack, consists of an air material and a stack size of 0.@NotNull ItemStack
ItemFactory.enchantItem
(@NotNull World world, @NotNull ItemStack item, int level, boolean allowTreasures) @NotNull ItemStack
ItemFactory.enchantItem
(@NotNull Entity entity, @NotNull ItemStack item, int level, boolean allowTreasures) @NotNull ItemStack
ItemFactory.enchantItem
(@NotNull ItemStack item, int level, boolean allowTreasures) @NotNull ItemStack
ItemFactory.enchantWithLevels
(@NotNull ItemStack itemStack, int levels, boolean allowTreasure, Random random) Randomly enchants a copy of the providedItemStack
using the given experience levels.@NotNull ItemStack
ItemFactory.enchantWithLevels
(@NotNull ItemStack itemStack, int levels, RegistryKeySet<@NotNull Enchantment> keySet, Random random) Randomly enchants a copy of the providedItemStack
using the given experience levels.@NotNull ItemStack
ItemStack.enchantWithLevels
(int levels, boolean allowTreasure, Random random) Randomly enchants a copy of thisItemStack
using the given experience levels.@NotNull ItemStack
ItemStack.enchantWithLevels
(int levels, RegistryKeySet<@NotNull Enchantment> keySet, Random random) Randomly enchants a copy of thisItemStack
using the given experience levels.@NotNull ItemStack
ItemFactory.ensureServerConversions
(@NotNull ItemStack item) Minecraft's 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 theadjusted
first ingredient.ArmoredHorseInventory.getArmor()
Gets the item in the horse's armor slot.ItemStack @NotNull []
EntityEquipment.getArmorContents()
Gets all ItemStacks from the armor slots.@Nullable ItemStack @NotNull []
PlayerInventory.getArmorContents()
Gets all ItemStacks from the armor slots.default @Nullable ItemStack
LecternInventory.getBook()
Gets the lectern's held book.EntityEquipment.getBoots()
Gets the boots currently being worn by the entity@Nullable ItemStack
PlayerInventory.getBoots()
Return the ItemStack from the boots slotEntityEquipment.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@NotNull 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.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.UseCookingRecipe.getInputChoice()
instead for more complete data.@NotNull ItemStack
StonecuttingRecipe.getInput()
Deprecated.UseStonecuttingRecipe.getInputChoice()
instead for more complete data.default @Nullable ItemStack
SmithingInventory.getInputEquipment()
Gets the input equipment (second slot).default @Nullable ItemStack
StonecutterInventory.getInputItem()
Gets the input item.default @Nullable ItemStack
SmithingInventory.getInputMineral()
Gets the input mineral (third slot).default @Nullable ItemStack
SmithingInventory.getInputTemplate()
Gets the input template (first slot).@Nullable ItemStack
BeaconInventory.getItem()
Get the item powering the beacon.@Nullable ItemStack
DecoratedPotInventory.getItem()
Get the item stack in the decorated pot.@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()
EntityEquipment.getLeggings()
Gets the leggings currently being worn by the entity@Nullable ItemStack
PlayerInventory.getLeggings()
Return the ItemStack from the leg slotdefault @Nullable ItemStack
GrindstoneInventory.getLowerItem()
Gets the lower input item.@Nullable ItemStack @NotNull []
CraftingInventory.getMatrix()
Get the contents of the crafting matrix.@Nullable ItemStack
JukeboxInventory.getRecord()
Get the record in the jukebox.default @Nullable ItemStack
AnvilInventory.getResult()
Gets the item in the result slot.default @Nullable ItemStack
CartographyInventory.getResult()
Check what item is in the result slot of this cartography table.@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.@NotNull ItemStack
CraftingRecipe.getResult()
Get the result of this recipe.@Nullable ItemStack
FurnaceInventory.getResult()
Get the current item in the result slot.default @Nullable ItemStack
GrindstoneInventory.getResult()
Gets the result.@NotNull ItemStack
ItemCraftResult.getResult()
The resultingItemStack
that was crafted.@NotNull ItemStack
MerchantRecipe.getResult()
@NotNull ItemStack
Recipe.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.@NotNull ItemStack @NotNull []
ItemCraftResult.getResultingMatrix()
Gets the resulting matrix from the crafting operation.@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 @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.static @NotNull ItemStack
Creates an itemstack with the specified item type and a count of 1.static @NotNull ItemStack
Creates an itemstack with the specified item type and count.@NotNull ItemStack
ItemStack.subtract()
Subtracts 1 to this itemstack.@NotNull ItemStack
ItemStack.subtract
(int qty) Subtracts quantity to this itemstack.@NotNull ItemStack
Creates a new ItemStack with the specified Material type, where the item count and item meta is preserved.Methods in org.bukkit.inventory that return types with arguments of type ItemStackModifier and TypeMethodDescriptionStores the given ItemStacks in the inventory.Returns a HashMap with all slots and ItemStacks in the inventory with the given Material.Finds all slots in the inventory containing any ItemStacks with the given ItemStack.RecipeChoice.ExactChoice.getChoices()
ShapelessRecipe.getIngredientList()
Deprecated.UseShapelessRecipe.getChoiceList()
instead for more complete data.ShapedRecipe.getIngredientMap()
Deprecated.UseShapedRecipe.getChoiceMap()
instead for more complete data.MerchantRecipe.getIngredients()
ItemCraftResult.getOverflowItems()
Gets the overflowed items for items that don't fit back into the crafting matrix.@NotNull ListIterator
<ItemStack> Inventory.iterator()
@NotNull ListIterator
<ItemStack> Inventory.iterator
(int index) Returns an iterator starting at the given index.Inventory.removeItem
(@NotNull ItemStack... items) Removes the given ItemStacks from the storage contents of the inventory.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 ItemStackModifier and TypeMethodDescriptionvoid
MerchantRecipe.addIngredient
(@NotNull ItemStack item) @NotNull ShapelessRecipe
ShapelessRecipe.addIngredient
(int count, @NotNull ItemStack item) @NotNull ShapelessRecipe
ShapelessRecipe.addIngredient
(@NotNull ItemStack item) Stores the given ItemStacks in the inventory.void
Modifies the amount of the givenItemStack
in the same way as MerchantRecipe dynamically adjusts the amount of the first ingredient during trading.Finds all slots in the inventory containing any ItemStacks with the given ItemStack.ItemFactory.asHoverEvent
(@NotNull ItemStack item, UnaryOperator<HoverEvent.ShowItem> op) Creates a hover event for the given item.@Nullable ItemMeta
Returns an appropriate item meta for the specified stack.boolean
Checks if this itemstack can repair another.boolean
Check if an item can be smelted in this furnace containerprotected static @NotNull ItemStack
CraftingRecipe.checkResult
(@NotNull ItemStack result) Checks an ItemStack to be used in constructors related to CraftingRecipe is not empty.boolean
Checks if the inventory contains any ItemStacks matching the given ItemStack.boolean
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.void
ItemStack.copyDataFrom
(@NotNull ItemStack source, @NotNull Predicate<@NotNull DataComponentType> filter) Copies component values and component removals from the provided ItemStack.ItemFactory.displayName
(@NotNull ItemStack itemStack) Get the formatted display name of theItemStack
.@NotNull ItemStack
ItemFactory.enchantItem
(@NotNull World world, @NotNull ItemStack item, int level, boolean allowTreasures) @NotNull ItemStack
ItemFactory.enchantItem
(@NotNull Entity entity, @NotNull ItemStack item, int level, boolean allowTreasures) @NotNull ItemStack
ItemFactory.enchantItem
(@NotNull ItemStack item, int level, boolean allowTreasures) @NotNull ItemStack
ItemFactory.enchantWithLevels
(@NotNull ItemStack itemStack, int levels, boolean allowTreasure, Random random) Randomly enchants a copy of the providedItemStack
using the given experience levels.@NotNull ItemStack
ItemFactory.enchantWithLevels
(@NotNull ItemStack itemStack, int levels, RegistryKeySet<@NotNull Enchantment> keySet, Random random) Randomly enchants a copy of the providedItemStack
using the given experience levels.@NotNull ItemStack
ItemFactory.ensureServerConversions
(@NotNull ItemStack item) Minecraft's updates are converting simple item stacks into more complex NBT oriented Item Stacks.int
Returns the first slot in the inventory containing an ItemStack with the given stack.@Nullable String
ItemFactory.getI18NDisplayName
(@Nullable ItemStack item) Deprecated, for removal: This API element is subject to removal in a future version.ItemStack
implementsTranslatable
; use that andComponent.translatable(net.kyori.adventure.translation.Translatable)
instead.net.md_5.bungee.api.chat.hover.content.Content
ItemFactory.hoverContentOf
(@NotNull ItemStack itemStack) Deprecated.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
Check if an item can be used as a fuel source in this furnace containerboolean
ItemStack.isRepairableBy
(@NotNull ItemStack repairMaterial) Checks if an itemstack can repair this itemstack.boolean
This method is the same as equals, but does not consider stack size (amount).boolean
ItemStack.matchesWithoutData
(@NotNull ItemStack item, Set<@NotNull DataComponentType> excludeTypes) Checks if this itemstack matches another given itemstack excluding the provided components.boolean
ItemStack.matchesWithoutData
(@NotNull ItemStack item, Set<@NotNull DataComponentType> excludeTypes, boolean ignoreCount) Checks if this itemstack matches another given itemstack excluding the provided components.void
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) Inventory.removeItem
(@NotNull ItemStack... items) Removes the given ItemStacks from the storage contents of the inventory.Inventory.removeItemAnySlot
(@NotNull ItemStack... items) Searches all possible inventory slots in order to remove the given ItemStacks.static byte @NotNull []
ItemStack.serializeItemsAsBytes
(@Nullable ItemStack @NotNull [] items) Serializes a collection of items to raw bytes in NBT.void
Sets the item in the horse's armor slot.void
EntityEquipment.setArmorContents
(@NotNull ItemStack @NotNull [] items) Sets the entities armor to the provided array of ItemStacksvoid
PlayerInventory.setArmorContents
(@Nullable ItemStack @NotNull [] items) Put the given ItemStacks into the armor slotsdefault void
Sets the lectern's held book.void
Sets the boots worn by the entityvoid
Sets the boots worn by the entityvoid
Put the given ItemStack into the boots slot.void
EntityEquipment.setChestplate
(@Nullable ItemStack chestplate) Sets the chest plate worn by the entityvoid
EntityEquipment.setChestplate
(@Nullable ItemStack chestplate, boolean silent) Sets the chest plate worn by the entityvoid
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.void
Sets the item on the cursor of one of the viewing players.void
Sets the item in the llama's decor slot.void
PlayerInventory.setExtraContents
(@Nullable ItemStack @NotNull [] items) Put the given ItemStacks into the extra slots
SeePlayerInventory.getExtraContents()
for an explanation of extra slots.default void
AnvilInventory.setFirstItem
(@Nullable ItemStack firstItem) Sets the item in the left input slot.void
Set the current fuel for brewing.void
Set the current fuel.void
Sets the helmet worn by the entityvoid
Sets the helmet worn by the entityvoid
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 (second slot).default void
StonecutterInventory.setInputItem
(@Nullable ItemStack itemStack) Sets the input item.default void
SmithingInventory.setInputMineral
(@Nullable ItemStack itemStack) Sets the input mineral (third slot).default void
SmithingInventory.setInputTemplate
(@Nullable ItemStack itemStack) Sets the input template (first slot).void
Set the item powering the beacon.void
Set the item stack in the decorated pot.void
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
Stores the ItemStack at the given index of the inventory.void
Sets one item in this inventory view by its raw slot ID.void
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 insteadvoid
PlayerInventory.setItemInHand
(@Nullable ItemStack stack) Deprecated.players can duel wield now use the methods for the specific hand insteadvoid
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 entityvoid
EntityEquipment.setLeggings
(@Nullable ItemStack leggings, boolean silent) Sets the leggings worn by the entityvoid
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
Replace the contents of the crafting matrixvoid
Set the record in the jukebox.default void
Sets the item in the result slot.default void
Set the item in the result slot of the cartography tablevoid
Set the item in the result slot of the crafting inventory.void
Set the current item in the result slot.default void
Sets the result.void
Set the item in the result slot of the smithing tabledefault void
Sets the result item.void
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 slotsdefault void
GrindstoneInventory.setUpperItem
(@Nullable ItemStack upperItem) Sets the upper input item.boolean
boolean
boolean
Method parameters in org.bukkit.inventory with type arguments of type ItemStackModifier and TypeMethodDescriptionstatic byte @NotNull []
ItemStack.serializeItemsAsBytes
(@NotNull Collection<ItemStack> items) Serializes a collection of items to raw bytes in NBT.void
MerchantRecipe.setIngredients
(@NotNull List<ItemStack> ingredients) Constructors in org.bukkit.inventory with parameters of type ItemStackModifierConstructorDescriptionBlastingRecipe
(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, float experience, int cookingTime) BlastingRecipe
(@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) CampfireRecipe
(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime) CookingRecipe
(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, float experience, int cookingTime) Create a cooking recipe to craft the specified ItemStack.CookingRecipe
(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime) Create a cooking recipe to craft the specified ItemStack.protected
CraftingRecipe
(@NotNull NamespacedKey key, @NotNull ItemStack result) ExactChoice
(@NotNull ItemStack stack) ExactChoice
(@NotNull ItemStack... stacks) 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, for removal: This API element is subject to removal in a future version.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 ItemStack result, @NotNull Material source) Deprecated, for removal: This API element is subject to removal in a future version.FurnaceRecipe
(@NotNull ItemStack result, @NotNull Material source, int data) Deprecated, for removal: This API element is subject to removal in a future version.FurnaceRecipe
(@NotNull ItemStack result, @NotNull MaterialData source) Deprecated, for removal: This API element is subject to removal in a future version.FurnaceRecipe
(@NotNull ItemStack result, @NotNull MaterialData source, float experience) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new item stack derived from the specified stackMerchantRecipe
(@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 NamespacedKey key, @NotNull ItemStack result) Create a shaped recipe to craft the specified ItemStack.ShapedRecipe
(@NotNull ItemStack result) Deprecated.Recipes must have keys.ShapelessRecipe
(@NotNull NamespacedKey key, @NotNull ItemStack result) Create a shapeless recipe to craft the specified ItemStack.ShapelessRecipe
(@NotNull ItemStack result) Deprecated.SmithingRecipe
(@NotNull NamespacedKey key, @NotNull ItemStack result, @Nullable RecipeChoice base, @Nullable RecipeChoice addition) Deprecated.as of Minecraft 1.20, smithing recipes are now separated into two distinct recipe types,SmithingTransformRecipe
andSmithingTrimRecipe
.SmithingRecipe
(@NotNull NamespacedKey key, @NotNull ItemStack result, @Nullable RecipeChoice base, @Nullable RecipeChoice addition, boolean copyDataComponents) Deprecated.SmithingTransformRecipe
(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition) Create a smithing recipe to produce the specified result ItemStack.SmithingTransformRecipe
(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition, boolean copyDataComponents) Create a smithing recipe to produce the specified result ItemStack.SmokingRecipe
(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, float experience, int cookingTime) SmokingRecipe
(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime) StonecuttingRecipe
(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source) Create a Stonecutting recipe to craft the specified ItemStack.StonecuttingRecipe
(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input) Create a Stonecutting recipe to craft the specified ItemStack.Constructor parameters in org.bukkit.inventory with type arguments of type ItemStack -
Uses of ItemStack in org.bukkit.inventory.meta
Methods in org.bukkit.inventory.meta that return ItemStackModifier and TypeMethodDescription@Nullable ItemStack
ItemMeta.getUseRemainder()
Gets the item which this item will convert to when used.Methods in org.bukkit.inventory.meta that return types with arguments of type ItemStackModifier and TypeMethodDescriptionCrossbowMeta.getChargedProjectiles()
Returns an immutable list of the projectiles charged on this item.BundleMeta.getItems()
Returns an immutable list of the items stored in this item.Methods in org.bukkit.inventory.meta with parameters of type ItemStackModifier and TypeMethodDescriptionvoid
CrossbowMeta.addChargedProjectile
(@NotNull ItemStack item) Adds a charged projectile to this item.void
Adds an item to this item.void
ItemMeta.setUseRemainder
(@Nullable ItemStack remainder) Sets the item which this item will convert to when used.Method parameters in org.bukkit.inventory.meta with type arguments of type ItemStack -
Uses of ItemStack in org.bukkit.loot
Methods in org.bukkit.loot that return types with arguments of type ItemStackModifier and TypeMethodDescription@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 ItemStackModifier and TypeMethodDescriptionMaterialData.toItemStack()
Deprecated.this method creates an ItemStack of size 0 which is not generally useful.MaterialData.toItemStack
(int amount) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new ItemStack based on this MaterialData -
Uses of ItemStack in org.bukkit.spawner
Methods in org.bukkit.spawner with parameters of type ItemStack
Bukkit.createExplorerMap(World, Location, org.bukkit.generator.structure.StructureType, org.bukkit.map.MapCursor.Type)