Uses of Class
org.bukkit.inventory.ItemStack
Packages that use ItemStack
Package
Description
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.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 to represent various
potion
properties and manipulation.-
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()Fires thee event, returning the desired potion, or air of cancelledMethods in com.destroystokyo.paper.event.entity with parameters of type ItemStackModifier and TypeMethodDescriptionFires thee event, returning the desired potion, or air of cancelledvoidSets the potion to be consumed and applied to the witch.voidSets the potion the which is going to hold and usevoidSets the potion to be thrown at a playerConstructors in com.destroystokyo.paper.event.entity with parameters of type ItemStackModifierConstructorDescriptionWitchConsumePotionEvent(@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 ItemStackMethods in com.destroystokyo.paper.event.inventory with parameters of type ItemStackConstructors in com.destroystokyo.paper.event.inventory with parameters of type ItemStackModifierConstructorDescriptionPrepareGrindstoneEvent(@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 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(@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) -
Uses of ItemStack in com.destroystokyo.paper.inventory
Fields in com.destroystokyo.paper.inventory with type parameters of type ItemStackMethods in com.destroystokyo.paper.inventory that return ItemStackMethods in com.destroystokyo.paper.inventory with parameters of type ItemStackModifier and TypeMethodDescriptionbooleanDeprecated.Constructors in com.destroystokyo.paper.inventory with parameters of type ItemStackConstructor parameters in com.destroystokyo.paper.inventory with type arguments of type ItemStack -
Uses of ItemStack in io.papermc.paper.advancement
Methods in io.papermc.paper.advancement that return ItemStack -
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. -
Uses of ItemStack in io.papermc.paper.event.block
Methods in io.papermc.paper.event.block that return ItemStackModifier and TypeMethodDescriptionPlayerShearBlockEvent.getItem()Gets the item used to shear the block.BlockPreDispenseEvent.getItemStack()Gets theItemStackto be dispensed.Methods in io.papermc.paper.event.block that return types with arguments of type ItemStackModifier and TypeMethodDescriptionBlockBreakBlockEvent.getDrops()Get the drops of this eventPlayerShearBlockEvent.getDrops()Gets the resulting drops of this event.Constructors in io.papermc.paper.event.block with parameters of type ItemStackModifierConstructorDescriptionBlockPreDispenseEvent(@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 -
Uses of ItemStack in io.papermc.paper.event.entity
Methods in io.papermc.paper.event.entity that return ItemStackModifier and TypeMethodDescriptionEntityLoadCrossbowEvent.getCrossbow()Gets the crossbowItemStackbeing loaded.EntityDamageItemEvent.getItem()Gets the item being damaged.Constructors in io.papermc.paper.event.entity with parameters of type ItemStackModifierConstructorDescriptionEntityDamageItemEvent(@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 ItemStackModifier and TypeMethodDescriptionPlayerLecternPageChangeEvent.getBook()Gets the current ItemStack on the lectern.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 theItemStackinvolved in this event.Methods in io.papermc.paper.event.player with parameters of type ItemStackModifier and TypeMethodDescriptionvoidPlayerItemFrameChangeEvent.setItemStack(@Nullable ItemStack itemStack) Constructors in io.papermc.paper.event.player with parameters of type ItemStackModifierConstructorDescriptionPlayerFlowerPotManipulateEvent(@NotNull Player player, @NotNull Block flowerpot, @NotNull ItemStack item, boolean placing) 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 ItemStackModifier and TypeMethodDescriptionPotionMix.getResult()Gets the resulting itemstack after the brew has finished.Constructors in io.papermc.paper.potion with parameters of type ItemStackModifierConstructorDescriptionPotionMix(@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 ItemStackModifier and TypeMethodDescriptionGet the crafted item using the list ofItemStackprovided.Get the crafted item using the list ofItemStackprovided.Bukkit.createExplorerMap(@NotNull World world, @NotNull Location location, @NotNull StructureType structureType) Create a new explorer map targeting the closest nearby structure of a givenStructureType.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 givenStructureType.Server.createExplorerMap(@NotNull World world, @NotNull Location location, @NotNull StructureType structureType) Create a new explorer map targeting the closest nearby structure of a givenStructureType.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 givenStructureType.UnsafeValues.deserializeItem(byte[] data) Deprecated.UnsafeValues.modifyItemStack(ItemStack stack, String arguments) Deprecated.Methods in org.bukkit with parameters of type ItemStackModifier and TypeMethodDescriptionGet the crafted item using the list ofItemStackprovided.Get the crafted item using the list ofItemStackprovided.Drops an item at the specifiedLocationWorld.dropItem(@NotNull Location location, @NotNull ItemStack item, @Nullable Consumer<Item> function) Drops an item at the specifiedLocationNote that functions will run before the entity is spawnedWorld.dropItemNaturally(@NotNull Location location, @NotNull ItemStack item) Drops an item at the specifiedLocationwith a random offsetWorld.dropItemNaturally(@NotNull Location location, @NotNull ItemStack item, @Nullable Consumer<Item> function) Drops an item at the specifiedLocationwith a random offset Note that functions will run before the entity is spawnedBukkit.getCraftingRecipe(@NotNull ItemStack[] craftingMatrix, @NotNull World world) Get theRecipefor the list of ItemStacks provided.Server.getCraftingRecipe(@NotNull ItemStack[] craftingMatrix, @NotNull World world) Get theRecipefor the list of ItemStacks provided.UnsafeValues.getItemStackRarity(ItemStack itemStack) Deprecated.Gets the item rarity of the itemstack.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.Return the translation key for the ItemStack, so the client can translate it into the active locale when using aTranslatableComponent.booleanUnsafeValues.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. -
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 TypeMethodDescriptionCampfire.getItem(int index) Jukebox.getRecord()Gets the record item inserted into the jukebox.Methods in org.bukkit.block that return types with arguments of type ItemStackModifier and TypeMethodDescriptionBlock.getDrops()Returns a list of items which would drop by destroying this blockReturns a list of items which would drop by the entity destroying this block with a specific toolReturns a list of items which would drop by destroying this block with a specific toolMethods in org.bukkit.block with parameters of type ItemStackModifier and TypeMethodDescriptionbooleanBlock.breakNaturally(@NotNull ItemStack tool, boolean triggerEffect) Breaks the block and spawns item drops as if a player had broken it with a specific toolbooleanBlock.breakNaturally(@Nullable ItemStack tool) Breaks the block and spawns items as if a player had digged it with a specific tooldefault @org.jetbrains.annotations.NotNull floatBlock.getDestroySpeed(@NotNull ItemStack itemStack) Gets the speed at which this block will be destroyed by a givenItemStack@org.jetbrains.annotations.NotNull floatBlock.getDestroySpeed(@NotNull ItemStack itemStack, boolean considerEnchants) Gets the speed at which this blook will be destroyed by a givenItemStackReturns a list of items which would drop by the entity destroying this block with a specific toolReturns a list of items which would drop by destroying this block with a specific toolbooleanBlock.isPreferredTool(@NotNull ItemStack tool) Returns if the given item is a preferred choice to break this Block.booleanBlock.isValidTool(@NotNull ItemStack itemStack) Checks if the itemstack is a valid tool to break the block withvoidvoidSets the record being played.voidCreatureSpawner.setSpawnedItem(ItemStack itemStack) -
Uses of ItemStack in org.bukkit.configuration
Methods in org.bukkit.configuration that return ItemStackModifier and TypeMethodDescriptionConfigurationSection.getItemStack(@NotNull String path) Gets the requested ItemStack by path.ConfigurationSection.getItemStack(@NotNull String path, @Nullable ItemStack def) Gets the requestedItemStackby path, returning a default value if not found.MemorySection.getItemStack(@NotNull String path) MemorySection.getItemStack(@NotNull String path, @Nullable ItemStack def) Methods in org.bukkit.configuration with parameters of type ItemStack -
Uses of ItemStack in org.bukkit.enchantments
Methods in org.bukkit.enchantments with parameters of type ItemStackModifier and TypeMethodDescriptionabstract booleanEnchantment.canEnchantItem(@NotNull ItemStack item) Checks if this Enchantment may be applied to the givenItemStack.booleanEnchantmentWrapper.canEnchantItem(@NotNull ItemStack item) booleanCheck whether this target includes the specified item. -
Uses of ItemStack in org.bukkit.entity
Methods in org.bukkit.entity that return ItemStackModifier and TypeMethodDescriptionLivingEntity.getActiveItem()Get's the item being actively "used" or consumed.ArmorStand.getBoots()Deprecated.ArmorStand.getChestplate()Deprecated.SizedFireball.getDisplayItem()Gets the displayItemStack.Witch.getDrinkingPotion()Get the potion the Witch is drinkingArmorStand.getHelmet()Deprecated.preferEntityEquipment.getHelmet()ArmorStand.getItem(EquipmentSlot slot) Returns the item the armor stand has equip in the given equipment slotEnderSignal.getItem()Get theItemStackto be displayed while in the air and to be dropped on death.Firework.getItem()Gets the item used in the firework.ItemFrame.getItem()Get the item in this frameThrowableProjectile.getItem()Gets the ItemStack the thrown projectile will display.ThrownPotion.getItem()Returns a copy of the ItemStack for this thrown potion.ArmorStand.getItemInHand()Deprecated.preferArmorStand.getItem(EquipmentSlot)// PaperHumanEntity.getItemInHand()Deprecated.Humans may now dual wield in their off hand, use explicit methods inPlayerInventory.HumanEntity.getItemInUse()Deprecated.Deprecated in favor ofLivingEntity.getActiveItem()HumanEntity.getItemOnCursor()Returns the ItemStack currently on your cursor, can be empty.AbstractArrow.getItemStack()Gets the ItemStack for this arrow.Item.getItemStack()Gets the item stack associated with this item drop.ArmorStand.getLeggings()Deprecated.Methods in org.bukkit.entity with parameters of type ItemStackModifier and TypeMethodDescriptionPlayer.boostElytra(@NotNull ItemStack firework) Boost a Player that'sLivingEntity.isGliding()using aFirework.booleanAnimals.isBreedItem(@NotNull ItemStack stack) Check if the provided ItemStack is the correct item used for breeding this entity.voidOpen aMaterial.WRITTEN_BOOKfor a PlayervoidPlayer.sendEquipmentChange(@NotNull LivingEntity entity, @NotNull EquipmentSlot slot, @NotNull ItemStack item) Send the equipment change of an entity.voidDeprecated.voidArmorStand.setChestplate(@Nullable ItemStack item) Deprecated.voidSizedFireball.setDisplayItem(@NotNull ItemStack item) Sets the displayItemStackfor the fireball.voidWitch.setDrinkingPotion(@Nullable ItemStack potion) Set the potion the Witch should drinkvoidDeprecated.voidArmorStand.setItem(EquipmentSlot slot, @Nullable ItemStack item) Sets the item the armor stand has equip in the given equipment slotvoidSet theItemStackto be displayed while in the air and to be dropped on death.voidSets the item used in the firework.voidSet the item in this framevoidSet the item in this framevoidSets the display ItemStack for the thrown projectile.voidSet the ItemStack for this thrown potion.voidArmorStand.setItemInHand(@Nullable ItemStack item) Deprecated.preferArmorStand.setItem(EquipmentSlot, ItemStack)// PapervoidHumanEntity.setItemInHand(@Nullable ItemStack item) Deprecated.Humans may now dual wield in their off hand, use explicit methods inPlayerInventory.voidHumanEntity.setItemOnCursor(@Nullable ItemStack item) Sets the item to the given ItemStack, this will replace whatever the user was moving.voidItem.setItemStack(@NotNull ItemStack stack) Sets the item stack associated with this item drop.voidArmorStand.setLeggings(@Nullable ItemStack item) Deprecated. -
Uses of ItemStack in org.bukkit.event.block
Fields in org.bukkit.event.block declared as ItemStackMethods in org.bukkit.event.block that return ItemStackModifier and TypeMethodDescriptionBlockDispenseEvent.getItem()Gets the item that is being dispensed.BlockDamageAbortEvent.getItemInHand()Gets the ItemStack for the item currently in the player's hand.BlockDamageEvent.getItemInHand()Gets the ItemStack for the item currently in the player's hand.BlockPlaceEvent.getItemInHand()Gets the item in the player's hand when they placed the block.BlockCookEvent.getResult()Gets the resultant ItemStack for this eventBlockCookEvent.getSource()Gets the smelted ItemStack for this eventBlockShearEntityEvent.getTool()Gets the item used to shear this sheep.Methods in org.bukkit.event.block with parameters of type ItemStackModifier and TypeMethodDescriptionvoidSets the item being dispensed.voidSets the resultant ItemStack for this eventConstructors in org.bukkit.event.block with parameters of type ItemStackModifierConstructorDescriptionDeprecated.BlockCookEvent(@NotNull Block block, @NotNull ItemStack source, @NotNull ItemStack result, CookingRecipe<?> recipe) BlockDamageEvent(@NotNull Player player, @NotNull Block block, @NotNull ItemStack itemInHand, boolean instaBreak) BlockDispenseArmorEvent(@NotNull Block block, @NotNull ItemStack dispensed, @NotNull LivingEntity target) 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) -
Uses of ItemStack in org.bukkit.event.enchantment
Methods in org.bukkit.event.enchantment that return ItemStackModifier and TypeMethodDescriptionEnchantItemEvent.getItem()Gets the item to be enchanted (can be modified)PrepareItemEnchantEvent.getItem()Gets the item to be enchanted.Constructors 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, 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 ItemStackModifier and TypeMethodDescriptionEntityShootBowEvent.getArrowItem()Deprecated.EntityShootBowEvent.getBow()Gets the bow ItemStack used to fire the arrow.EntityBreedEvent.getBredWith()The ItemStack that was used to initiate breeding, if present.EntityShootBowEvent.getConsumable()Get the ItemStack to be consumed in this event (if any).PiglinBarterEvent.getInput()Gets the input of the barter.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.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) Constructor parameters in org.bukkit.event.entity with type arguments of type ItemStackModifierConstructorDescriptionEntityDeathEvent(@NotNull LivingEntity entity, @NotNull List<ItemStack> drops) EntityDeathEvent(@NotNull LivingEntity what, @NotNull List<ItemStack> drops, int droppedExp) 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 ItemStackModifier and TypeMethodDescriptionHangingPlaceEvent.getItemStack()Gets the item from which the hanging entity originatedConstructors in org.bukkit.event.hanging with parameters of type ItemStack -
Uses of ItemStack in org.bukkit.event.inventory
Methods in org.bukkit.event.inventory that return ItemStackModifier and TypeMethodDescriptionInventoryClickEvent.getCurrentItem()Gets the ItemStack currently in the clicked slot.InventoryClickEvent.getCursor()Gets the current ItemStack on the cursor.InventoryCreativeEvent.getCursor()InventoryDragEvent.getCursor()Gets the result cursor after the drag is done.BrewingStandFuelEvent.getFuel()Gets the ItemStack of the fuel before the amount was subtracted.FurnaceBurnEvent.getFuel()Gets the fuel ItemStack for this eventInventoryMoveItemEvent.getItem()Gets the ItemStack being moved; if modified, the original item will not be removed from the source inventory.InventoryDragEvent.getOldCursor()Gets an ItemStack representing the cursor prior to any modifications as a result of this drag.PrepareAnvilEvent.getResult()Get result item, may be null.PrepareSmithingEvent.getResult()Get result item, may be null.FurnaceStartSmeltEvent.getSource()Gets the source ItemStack for this eventMethods 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 TypeMethodDescriptionvoidInventoryClickEvent.setCurrentItem(@Nullable ItemStack stack) Sets the ItemStack currently in the clicked slot.voidDeprecated.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.voidvoidSets the result cursor after the drag is done.voidSets the ItemStack being moved; if this is different from the original ItemStack, the original item will not be removed from the source inventory.voidvoidConstructors 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) 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 ItemStackModifierConstructorDescriptionBrewEvent(@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 ItemStackMethods in org.bukkit.event.player that return ItemStackModifier and TypeMethodDescriptionPlayerArmorStandManipulateEvent.getArmorStandItem()Returns the item held by the armor stand.PlayerTakeLecternBookEvent.getBook()Gets the current ItemStack on the lectern.PlayerItemBreakEvent.getBrokenItem()Gets the item that brokePlayerBucketEntityEvent.getEntityBucket()Gets the bucket that theEntitywill be put into.PlayerBucketFishEvent.getFishBucket()Deprecated.PlayerInteractEvent.getItem()Returns the item in hand represented by this eventPlayerItemConsumeEvent.getItem()Gets the item that is being consumed.PlayerItemDamageEvent.getItem()Gets the item being damaged.PlayerItemMendEvent.getItem()Get theItemStackto be repaired.PlayerRiptideEvent.getItem()Gets the item containing the used enchantment.PlayerShearEntityEvent.getItem()Gets the item used to shear the entity.PlayerBucketEvent.getItemStack()Get the resulting item in hand after the bucket eventPlayerSwapHandItemsEvent.getMainHandItem()Gets the item switched to the main hand.PlayerSwapHandItemsEvent.getOffHandItem()Gets the item switched to the off hand.PlayerBucketEntityEvent.getOriginalBucket()Gets the bucket used to capture theEntity.PlayerArmorStandManipulateEvent.getPlayerItem()Returns the item held by the player.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).PlayerBucketFishEvent.getWaterBucket()Deprecated.Methods in org.bukkit.event.player that return types with arguments of type ItemStackModifier and TypeMethodDescriptionPlayerHarvestBlockEvent.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 TypeMethodDescriptionvoidSet the item being consumedvoidPlayerBucketEvent.setItemStack(@Nullable ItemStack itemStack) Set the item in hand after the eventvoidPlayerSwapHandItemsEvent.setMainHandItem(@Nullable ItemStack mainHandItem) Sets the item in the main hand.voidPlayerSwapHandItemsEvent.setOffHandItem(@Nullable ItemStack offHandItem) Sets the item in the off hand.voidPlayerItemConsumeEvent.setReplacement(@Nullable ItemStack replacement) Set a custom item stack to replace the consumed item.Constructors in org.bukkit.event.player with parameters of type ItemStackModifierConstructorDescriptionPlayerArmorStandManipulateEvent(@NotNull Player who, @NotNull ArmorStand clickedEntity, @NotNull ItemStack playerItem, @NotNull ItemStack armorStandItem, @NotNull EquipmentSlot slot) PlayerBucketEmptyEvent(@NotNull Player who, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand) Deprecated.PlayerBucketEmptyEvent(@NotNull Player who, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand, @Nullable EquipmentSlot hand) Deprecated.PlayerBucketEmptyEvent(@NotNull Player who, @NotNull Block block, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand) PlayerBucketEmptyEvent(@NotNull Player who, @NotNull Block block, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand, @Nullable EquipmentSlot hand) PlayerBucketEntityEvent(@NotNull Player player, @NotNull Entity entity, @NotNull ItemStack originalBucket, @NotNull ItemStack entityBucket) PlayerBucketEvent(@NotNull Player who, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand) Deprecated.PlayerBucketEvent(@NotNull Player who, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand, @Nullable EquipmentSlot hand) Deprecated.PlayerBucketEvent(@NotNull Player who, @NotNull Block block, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand) PlayerBucketEvent(@NotNull Player who, @NotNull Block block, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand, @Nullable 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 blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand, @Nullable EquipmentSlot hand) Deprecated.PlayerBucketFillEvent(@NotNull Player who, @NotNull Block block, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand) PlayerBucketFillEvent(@NotNull Player who, @NotNull Block block, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand, @Nullable EquipmentSlot hand) PlayerBucketFishEvent(@NotNull Player player, @NotNull Fish fish, @NotNull ItemStack waterBucket, @NotNull ItemStack fishBucket) 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) 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) 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 -
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 TypeMethodDescriptionvoidLootGenerateEvent.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 TypeMethodDescriptionItemStack.add()Adds 1 to this itemstack.ItemStack.add(int qty) Adds quantity to this itemstack.ItemStack.asOne()Clones the itemstack and returns it a single quantity.ItemStack.asQuantity(int qty) Clones the itemstack and returns it as the specified quantityItemStack.clone()ItemFactory.createItemStack(@NotNull String input) Create a newItemStackgiven the supplied input.ItemStack.deserialize(@NotNull Map<String, Object> args) Required method for configuration serializationItemStack.deserializeBytes(@org.jetbrains.annotations.NotNull byte[] bytes) Deserializes this itemstack from raw NBT bytes.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 providedItemStackusing the given experience levels.ItemStack.enchantWithLevels(@org.jetbrains.annotations.Range(from=1L, to=30L) int levels, boolean allowTreasure, Random random) Randomly enchants a copy of thisItemStackusing the given experience levels.ItemFactory.ensureServerConversions(@NotNull ItemStack item) Minecraft updates are converting simple item stacks into more complex NBT oriented Item Stacks.ItemStack.ensureServerConversions()Minecraft updates are converting simple item stacks into more complex NBT oriented Item Stacks.MerchantRecipe.getAdjustedIngredient1()Gets theadjustedfirst ingredient.ArmoredHorseInventory.getArmor()Gets the item in the horse's armor slot.EntityEquipment.getArmorContents()Gets all worn armorPlayerInventory.getArmorContents()Get all ItemStacks from the armor slotsLecternInventory.getBook()Gets the lectern's held book.EntityEquipment.getBoots()Gets the boots currently being worn by the entityPlayerInventory.getBoots()Return the ItemStack from the boots slotEntityEquipment.getChestplate()Gets the chest plate currently being worn by the entityPlayerInventory.getChestplate()Return the ItemStack from the chestplate slotInventory.getContents()Returns all ItemStacks from the inventoryInventoryView.getCursor()Get the item on the cursor of one of the viewing players.LlamaInventory.getDecor()Gets the item in the llama's decor slot.PlayerInventory.getExtraContents()Get all additional ItemStacks stored in this inventory.AnvilInventory.getFirstItem()Gets the item in the left input slot.BrewerInventory.getFuel()Get the current fuel for brewing.FurnaceInventory.getFuel()Get the current fuel.EntityEquipment.getHelmet()Gets the helmet currently being worn by the entityPlayerInventory.getHelmet()Return the ItemStack from the helmet slotBrewerInventory.getIngredient()Get the current ingredient for brewing.CookingRecipe.getInput()Get the input material.StonecuttingRecipe.getInput()Get the input material.SmithingInventory.getInputEquipment()Gets the input equipment (first slot).StonecutterInventory.getInputItem()Gets the input item.SmithingInventory.getInputMineral()Gets the input mineral (second slot).BeaconInventory.getItem()Get the item powering the beacon.EnchantingInventory.getItem()Get the item being enchanted.EntityEquipment.getItem(@NotNull EquipmentSlot slot) Gets the ItemStack at the given equipment slot in the inventory.Inventory.getItem(int index) Returns the ItemStack found in the slot at the given indexInventoryView.getItem(int slot) Gets one item in this inventory view by its raw slot ID.PlayerInventory.getItem(@NotNull EquipmentSlot slot) Gets the ItemStack at the given equipment slot in the inventory.EntityEquipment.getItemInHand()Deprecated.entities can duel wield now use the methods for the specific hand insteadPlayerInventory.getItemInHand()Deprecated.players can duel wield now use the methods for the specific hand insteadEntityEquipment.getItemInMainHand()Gets the item the entity is currently holding in their main hand.PlayerInventory.getItemInMainHand()Gets the item the player is currently holding in their main hand.EntityEquipment.getItemInOffHand()Gets the item the entity is currently holding in their off hand.PlayerInventory.getItemInOffHand()Gets the item the player is currently holding in their off hand.RecipeChoice.ExactChoice.getItemStack()RecipeChoice.getItemStack()Deprecated.for compatibility onlyRecipeChoice.MaterialChoice.getItemStack()EntityEquipment.getLeggings()Gets the leggings currently being worn by the entityPlayerInventory.getLeggings()Return the ItemStack from the leg slotGrindstoneInventory.getLowerItem()Gets the lower input item.CraftingInventory.getMatrix()Get the contents of the crafting matrix.AnvilInventory.getResult()Gets the item in the result slot.CookingRecipe.getResult()Get the result of this recipe.CraftingInventory.getResult()Check what item is in the result slot of this crafting inventory.FurnaceInventory.getResult()Get the current item in the result slot.GrindstoneInventory.getResult()Gets the result.MerchantRecipe.getResult()Recipe.getResult()Get the result of this recipe.ShapedRecipe.getResult()Get the result.ShapelessRecipe.getResult()Get the result of this recipe.SmithingInventory.getResult()Check what item is in the result slot of this smithing table.SmithingRecipe.getResult()StonecutterInventory.getResult()Gets the result item.StonecuttingRecipe.getResult()Get the result of this recipe.AbstractHorseInventory.getSaddle()Gets the item in the horse's saddle slot.EnchantingInventory.getSecondary()Get the secondary item being used for the enchant.AnvilInventory.getSecondItem()Gets the item in the right input slot.FurnaceInventory.getSmelting()Get the item currently smelting.ItemFactory.getSpawnEgg(EntityType type) Get a spawn egg ItemStack from an EntityTypeInventory.getStorageContents()Return the contents from the section of the inventory where items can reasonably be expected to be stored.GrindstoneInventory.getUpperItem()Gets the upper input item.ItemStack.subtract()Subtracts 1 to this itemstack.ItemStack.subtract(int qty) Subtracts quantity to this itemstack.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()Get the list of ingredients used for this recipe.ShapedRecipe.getIngredientMap()Get a copy of the ingredients map.MerchantRecipe.getIngredients()Inventory.iterator()Inventory.iterator(int index) Returns an iterator starting at the given index.Inventory.removeItem(@NotNull ItemStack... items) Removes the given ItemStacks from 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 TypeMethodDescriptionvoidMerchantRecipe.addIngredient(@NotNull ItemStack item) ShapelessRecipe.addIngredient(int count, @NotNull ItemStack item) ShapelessRecipe.addIngredient(@NotNull ItemStack item) Stores the given ItemStacks in the inventory.voidModifies the amount of the givenItemStackin 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.Returns an appropriate item meta for the specified stack.booleanChecks if this itemstack can repair another.booleanCheck if an item can be smelted in this furnace containerbooleanChecks if the inventory contains any ItemStacks matching the given ItemStack.booleanChecks if the inventory contains at least the minimum amount specified of exactly matching ItemStacks.booleanInventory.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.ItemFactory.displayName(@NotNull ItemStack itemStack) Get the formatted display name of theItemStack.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 providedItemStackusing the given experience levels.ItemFactory.ensureServerConversions(@NotNull ItemStack item) Minecraft updates are converting simple item stacks into more complex NBT oriented Item Stacks.intReturns the first slot in the inventory containing an ItemStack with the given stack.ItemFactory.getI18NDisplayName(@Nullable ItemStack item) Deprecated.ItemStackimplementsTranslatable; use that andComponent.translatable(net.kyori.adventure.translation.Translatable)instead.net.md_5.bungee.api.chat.hover.content.ContentItemFactory.hoverContentOf(@NotNull ItemStack itemStack) Creates aContentof that ItemStack for displaying.booleanItemFactory.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.booleanCheck if an item can be used as a fuel source in this furnace containerbooleanItemStack.isRepairableBy(@NotNull ItemStack repairMaterial) Checks if an itemstack can repair this itemstack.booleanThis method is the same as equals, but does not consider stack size (amount).voidRemoves all stacks in the inventory matching the given stack.ShapelessRecipe.removeIngredient(int count, @NotNull ItemStack item) ShapelessRecipe.removeIngredient(@NotNull ItemStack item) Inventory.removeItem(@NotNull ItemStack... items) Removes the given ItemStacks from the inventory.Inventory.removeItemAnySlot(@NotNull ItemStack... items) Searches all possible inventory slots in order to remove the given ItemStacks.voidSets the item in the horse's armor slot.voidEntityEquipment.setArmorContents(@NotNull ItemStack[] items) Sets the entities armor to the provided array of ItemStacksvoidPlayerInventory.setArmorContents(@Nullable ItemStack[] items) Put the given ItemStacks into the armor slotsdefault voidSets the lectern's held book.voidSets the boots worn by the entityvoidSets the boots worn by the entityvoidPut the given ItemStack into the boots slot.voidEntityEquipment.setChestplate(@Nullable ItemStack chestplate) Sets the chest plate worn by the entityvoidEntityEquipment.setChestplate(@Nullable ItemStack chestplate, boolean silent) Sets the chest plate worn by the entityvoidPlayerInventory.setChestplate(@Nullable ItemStack chestplate) Put the given ItemStack into the chestplate slot.voidInventory.setContents(@Nullable ItemStack @NotNull [] items) Completely replaces the inventory's contents.final voidSets the item on the cursor of one of the viewing players.voidSets the item in the llama's decor slot.voidPlayerInventory.setExtraContents(@Nullable ItemStack[] items) Put the given ItemStacks into the extra slots
SeePlayerInventory.getExtraContents()for an explanation of extra slots.default voidAnvilInventory.setFirstItem(@Nullable ItemStack firstItem) Sets the item in the left input slot.voidSet the current fuel for brewing.voidSet the current fuel.voidSets the helmet worn by the entityvoidSets the helmet worn by the entityvoidPut the given ItemStack into the helmet slot.voidBrewerInventory.setIngredient(@Nullable ItemStack ingredient) Set the current ingredient for brewing.ShapedRecipe.setIngredient(char key, @NotNull ItemStack item) default voidSmithingInventory.setInputEquipment(@Nullable ItemStack itemStack) Sets the input equipment (first slot).default voidStonecutterInventory.setInputItem(@Nullable ItemStack itemStack) Sets the input item.default voidSmithingInventory.setInputMineral(@Nullable ItemStack itemStack) Sets the input mineral (second slot).voidSet the item powering the beacon.voidSet the item being enchanted.voidEntityEquipment.setItem(@NotNull EquipmentSlot slot, @Nullable ItemStack item) Stores the ItemStack at the given equipment slot in the inventory.voidEntityEquipment.setItem(@NotNull EquipmentSlot slot, @Nullable ItemStack item, boolean silent) Stores the ItemStack at the given equipment slot in the inventory.voidStores the ItemStack at the given index of the inventory.voidSets one item in this inventory view by its raw slot ID.voidStores the ItemStack at the given index of the inventory.voidPlayerInventory.setItem(@NotNull EquipmentSlot slot, @Nullable ItemStack item) Stores the ItemStack at the given equipment slot in the inventory.voidEntityEquipment.setItemInHand(@Nullable ItemStack stack) Deprecated.entities can duel wield now use the methods for the specific hand insteadvoidPlayerInventory.setItemInHand(@Nullable ItemStack stack) Deprecated.players can duel wield now use the methods for the specific hand insteadvoidEntityEquipment.setItemInMainHand(@Nullable ItemStack item) Sets the item the entity is holding in their main hand.voidEntityEquipment.setItemInMainHand(@Nullable ItemStack item, boolean silent) Sets the item the entity is holding in their main hand.voidPlayerInventory.setItemInMainHand(@Nullable ItemStack item) Sets the item the player is holding in their main hand.voidEntityEquipment.setItemInOffHand(@Nullable ItemStack item) Sets the item the entity is holding in their off hand.voidEntityEquipment.setItemInOffHand(@Nullable ItemStack item, boolean silent) Sets the item the entity is holding in their off hand.voidPlayerInventory.setItemInOffHand(@Nullable ItemStack item) Sets the item the player is holding in their off hand.voidEntityEquipment.setLeggings(@Nullable ItemStack leggings) Sets the leggings worn by the entityvoidEntityEquipment.setLeggings(@Nullable ItemStack leggings, boolean silent) Sets the leggings worn by the entityvoidPlayerInventory.setLeggings(@Nullable ItemStack leggings) Put the given ItemStack into the leg slot.default voidGrindstoneInventory.setLowerItem(@Nullable ItemStack lowerItem) Sets the lower input item.voidReplace the contents of the crafting matrixdefault voidSets the item in the result slot.voidSet the item in the result slot of the crafting inventory.voidSet the current item in the result slot.default voidSets the result.voidSet the item in the result slot of the smithing tabledefault voidSets the result item.voidSets the item in the horse's saddle slot.voidEnchantingInventory.setSecondary(@Nullable ItemStack item) Set the secondary item being used for the enchant.default voidAnvilInventory.setSecondItem(@Nullable ItemStack secondItem) Sets the item in the right input slot.voidFurnaceInventory.setSmelting(@Nullable ItemStack stack) Set the item currently smelting.voidInventory.setStorageContents(@Nullable ItemStack @NotNull [] items) Put the given ItemStacks into the storage slotsdefault voidGrindstoneInventory.setUpperItem(@Nullable ItemStack upperItem) Sets the upper input item.booleanbooleanbooleanMethod parameters in org.bukkit.inventory with type arguments of type ItemStackModifier and TypeMethodDescriptionvoidMerchantRecipe.setIngredients(@NotNull List<ItemStack> ingredients) Constructors in org.bukkit.inventory with parameters of type ItemStackModifierConstructorDescriptionBlastingRecipe(@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.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 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 -
Uses of ItemStack in org.bukkit.inventory.meta
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 TypeMethodDescriptionvoidCrossbowMeta.addChargedProjectile(@NotNull ItemStack item) Adds a charged projectile to this item.voidAdds an item to this item.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 TypeMethodDescriptionLootTable.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.Creates a new ItemStack based on this MaterialData -
Uses of ItemStack in org.bukkit.potion
Methods in org.bukkit.potion that return ItemStackModifier and TypeMethodDescriptionPotion.toItemStack(int amount) Deprecated.Converts this potion to anItemStackwith the specified amount and a correct damage value.Methods in org.bukkit.potion with parameters of type ItemStack
EntityEquipment.getBoots()