Uses of Class
org.bukkit.inventory.ItemStack
-
Packages that use ItemStack Package Description org.bukkit The root package of the Bukkit API, contains generalized API classes.org.bukkit.block Classes used to manipulate the voxels in aworld, including special states.org.bukkit.configuration Classes dedicated to handling a plugin's runtime configuration.org.bukkit.enchantments Classes relating to the specialized enhancements toitem stacks, as part of themeta data.org.bukkit.entity Interfaces for non-voxel objects that can exist in aworld, including all players, monsters, projectiles, etc.org.bukkit.event.block org.bukkit.event.enchantment Eventstriggered from anenchantment table.org.bukkit.event.entity org.bukkit.event.inventory org.bukkit.event.player org.bukkit.event.world org.bukkit.inventory Classes involved in manipulating player inventories and item interactions.org.bukkit.inventory.meta The interfaces used when manipulating extra data can can be stored insideitem stacks.org.bukkit.loot Classes relevant to loot table manipulation and generation.org.bukkit.material Classes that represents various voxel types and states.org.bukkit.potion Classes to represent variouspotionproperties and manipulation. -
-
Uses of ItemStack in org.bukkit
Methods in org.bukkit that return ItemStack Modifier and Type Method Description static @NotNull ItemStackBukkit. createExplorerMap(@NotNull World world, @NotNull Location location, @NotNull StructureType structureType)Create a new explorer map targeting the closest nearby structure of a givenStructureType.static @NotNull ItemStackBukkit. 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.@NotNull ItemStackServer. createExplorerMap(@NotNull World world, @NotNull Location location, @NotNull StructureType structureType)Create a new explorer map targeting the closest nearby structure of a givenStructureType.@NotNull ItemStackServer. 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.ItemStackUnsafeValues. modifyItemStack(ItemStack stack, String arguments)Deprecated.Methods in org.bukkit with parameters of type ItemStack Modifier and Type Method Description @NotNull ItemWorld. dropItem(@NotNull Location location, @NotNull ItemStack item)Drops an item at the specifiedLocation@NotNull ItemWorld. dropItemNaturally(@NotNull Location location, @NotNull ItemStack item)Drops an item at the specifiedLocationwith a random offsetstatic @NotNull List<Recipe>Bukkit. getRecipesFor(@NotNull ItemStack result)Get a list of all recipes for a given item.@NotNull List<Recipe>Server. getRecipesFor(@NotNull ItemStack result)Get a list of all recipes for a given item.ItemStackUnsafeValues. modifyItemStack(ItemStack stack, String arguments)Deprecated. -
Uses of ItemStack in org.bukkit.block
Methods in org.bukkit.block that return ItemStack Modifier and Type Method Description @Nullable ItemStackCampfire. getItem(int index)@NotNull ItemStackJukebox. getRecord()Gets the record item inserted into the jukebox.Methods in org.bukkit.block that return types with arguments of type ItemStack Modifier and Type Method Description @NotNull Collection<ItemStack>Block. getDrops()Returns a list of items which would drop by destroying this block@NotNull Collection<ItemStack>Block. getDrops(@NotNull ItemStack tool, @Nullable Entity entity)Returns a list of items which would drop by the entity destroying this block with a specific tool@NotNull Collection<ItemStack>Block. getDrops(@Nullable ItemStack tool)Returns a list of items which would drop by destroying this block with a specific toolMethods in org.bukkit.block with parameters of type ItemStack Modifier and Type Method Description booleanBlock. breakNaturally(@Nullable ItemStack tool)Breaks the block and spawns items as if a player had digged it with a specific tool@NotNull Collection<ItemStack>Block. getDrops(@NotNull ItemStack tool, @Nullable Entity entity)Returns a list of items which would drop by the entity destroying this block with a specific tool@NotNull Collection<ItemStack>Block. getDrops(@Nullable ItemStack tool)Returns a list of items which would drop by destroying this block with a specific toolvoidCampfire. setItem(int index, @Nullable ItemStack item)voidJukebox. setRecord(@Nullable ItemStack record)Sets the record being played. -
Uses of ItemStack in org.bukkit.configuration
Methods in org.bukkit.configuration that return ItemStack Modifier and Type Method Description @Nullable ItemStackConfigurationSection. getItemStack(@NotNull String path)Gets the requested ItemStack by path.@Nullable ItemStackConfigurationSection. getItemStack(@NotNull String path, @Nullable ItemStack def)Gets the requestedItemStackby path, returning a default value if not found.@Nullable ItemStackMemorySection. getItemStack(@NotNull String path)@Nullable ItemStackMemorySection. getItemStack(@NotNull String path, @Nullable ItemStack def)Methods in org.bukkit.configuration with parameters of type ItemStack Modifier and Type Method Description @Nullable ItemStackConfigurationSection. getItemStack(@NotNull String path, @Nullable ItemStack def)Gets the requestedItemStackby path, returning a default value if not found.@Nullable ItemStackMemorySection. getItemStack(@NotNull String path, @Nullable ItemStack def) -
Uses of ItemStack in org.bukkit.enchantments
Methods in org.bukkit.enchantments with parameters of type ItemStack Modifier and Type Method Description abstract booleanEnchantment. canEnchantItem(@NotNull ItemStack item)Checks if this Enchantment may be applied to the givenItemStack.booleanEnchantmentWrapper. canEnchantItem(@NotNull ItemStack item)booleanEnchantmentTarget. includes(@NotNull ItemStack item)Check whether this target includes the specified item. -
Uses of ItemStack in org.bukkit.entity
Methods in org.bukkit.entity that return ItemStack Modifier and Type Method Description @NotNull ItemStackArmorStand. getBoots()Deprecated.preferEntityEquipment.getBoots()@NotNull ItemStackArmorStand. getChestplate()Deprecated.@NotNull ItemStackSizedFireball. getDisplayItem()Gets the displayItemStack.@NotNull ItemStackArmorStand. getHelmet()Deprecated.preferEntityEquipment.getHelmet()@NotNull ItemStackItemFrame. getItem()Get the item in this frame@NotNull ItemStackThrowableProjectile. getItem()Gets the ItemStack the thrown projectile will display.@NotNull ItemStackThrownPotion. getItem()Returns a copy of the ItemStack for this thrown potion.@NotNull ItemStackArmorStand. getItemInHand()Deprecated.@NotNull ItemStackHumanEntity. getItemInHand()Deprecated.Humans may now dual wield in their off hand, use explicit methods inPlayerInventory.@NotNull ItemStackHumanEntity. getItemOnCursor()Returns the ItemStack currently on your cursor, can be empty.@NotNull ItemStackItem. getItemStack()Gets the item stack associated with this item drop.@NotNull ItemStackArmorStand. getLeggings()Deprecated.Methods in org.bukkit.entity with parameters of type ItemStack Modifier and Type Method Description voidPlayer. openBook(@NotNull ItemStack book)Open aMaterial.WRITTEN_BOOKfor a PlayervoidArmorStand. setBoots(@Nullable ItemStack item)Deprecated.voidArmorStand. setChestplate(@Nullable ItemStack item)Deprecated.voidSizedFireball. setDisplayItem(@NotNull ItemStack item)Sets the displayItemStackfor the fireball.voidArmorStand. setHelmet(@Nullable ItemStack item)Deprecated.voidItemFrame. setItem(@Nullable ItemStack item)Set the item in this framevoidItemFrame. setItem(@Nullable ItemStack item, boolean playSound)Set the item in this framevoidThrowableProjectile. setItem(@NotNull ItemStack item)Sets the display ItemStack for the thrown projectile.voidThrownPotion. setItem(@NotNull ItemStack item)Set the ItemStack for this thrown potion.voidArmorStand. setItemInHand(@Nullable ItemStack item)Deprecated.voidHumanEntity. 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(@Nullable 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 ItemStack Modifier and Type Field Description protected ItemStackBlockPlaceEvent. itemInHandMethods in org.bukkit.event.block that return ItemStack Modifier and Type Method Description @NotNull ItemStackBlockDispenseEvent. getItem()Gets the item that is being dispensed.@NotNull ItemStackBlockDamageEvent. getItemInHand()Gets the ItemStack for the item currently in the player's hand.@NotNull ItemStackBlockPlaceEvent. getItemInHand()Gets the item in the player's hand when they placed the block.@NotNull ItemStackBlockCookEvent. getResult()Gets the resultant ItemStack for this event@NotNull ItemStackBlockCookEvent. getSource()Gets the smelted ItemStack for this event@NotNull ItemStackBlockShearEntityEvent. getTool()Gets the item used to shear this sheep.Methods in org.bukkit.event.block with parameters of type ItemStack Modifier and Type Method Description voidBlockDispenseEvent. setItem(@NotNull ItemStack item)Sets the item being dispensed.voidBlockCookEvent. setResult(@NotNull ItemStack result)Sets the resultant ItemStack for this eventConstructors in org.bukkit.event.block with parameters of type ItemStack Constructor Description BlockCookEvent(@NotNull Block block, @NotNull ItemStack source, @NotNull ItemStack result)BlockDamageEvent(@NotNull Player player, @NotNull Block block, @NotNull ItemStack itemInHand, boolean instaBreak)BlockDispenseArmorEvent(@NotNull Block block, @NotNull ItemStack dispensed, @NotNull LivingEntity target)BlockDispenseEvent(@NotNull Block block, @NotNull ItemStack dispensed, @NotNull Vector velocity)BlockMultiPlaceEvent(@NotNull List<BlockState> states, @NotNull Block clicked, @NotNull ItemStack itemInHand, @NotNull Player thePlayer, boolean canBuild)BlockPlaceEvent(@NotNull Block placedBlock, @NotNull BlockState replacedBlockState, @NotNull Block placedAgainst, @NotNull ItemStack itemInHand, @NotNull Player thePlayer, boolean canBuild)Deprecated.BlockPlaceEvent(@NotNull Block placedBlock, @NotNull BlockState replacedBlockState, @NotNull Block placedAgainst, @NotNull ItemStack itemInHand, @NotNull Player thePlayer, boolean canBuild, @NotNull EquipmentSlot hand)BlockShearEntityEvent(@NotNull Block dispenser, @NotNull Entity sheared, @NotNull ItemStack tool) -
Uses of ItemStack in org.bukkit.event.enchantment
Methods in org.bukkit.event.enchantment that return ItemStack Modifier and Type Method Description @NotNull ItemStackEnchantItemEvent. getItem()Gets the item to be enchanted (can be modified)@NotNull ItemStackPrepareItemEnchantEvent. getItem()Gets the item to be enchanted.Constructors in org.bukkit.event.enchantment with parameters of type ItemStack Constructor Description EnchantItemEvent(@NotNull Player enchanter, @NotNull InventoryView view, @NotNull Block table, @NotNull ItemStack item, int level, @NotNull Map<Enchantment,Integer> enchants, int i)PrepareItemEnchantEvent(@NotNull Player enchanter, @NotNull InventoryView view, @NotNull Block table, @NotNull ItemStack item, @NotNull EnchantmentOffer[] offers, int bonus) -
Uses of ItemStack in org.bukkit.event.entity
Methods in org.bukkit.event.entity that return ItemStack Modifier and Type Method Description @Nullable ItemStackEntityShootBowEvent. getBow()Gets the bow ItemStack used to fire the arrow.@Nullable ItemStackEntityBreedEvent. getBredWith()The ItemStack that was used to initiate breeding, if present.@Nullable ItemStackFoodLevelChangeEvent. getItem()Gets the item that triggered this event, if any.Methods in org.bukkit.event.entity that return types with arguments of type ItemStack Modifier and Type Method Description @NotNull List<ItemStack>EntityDeathEvent. getDrops()Gets all the items which will drop when the entity diesConstructors in org.bukkit.event.entity with parameters of type ItemStack Constructor Description EntityBreedEvent(@NotNull LivingEntity child, @NotNull LivingEntity mother, @NotNull LivingEntity father, @Nullable LivingEntity breeder, @Nullable ItemStack bredWith, int experience)EntityShootBowEvent(@NotNull LivingEntity shooter, @Nullable ItemStack bow, @NotNull Entity projectile, float force)FoodLevelChangeEvent(@NotNull HumanEntity what, int level, @Nullable ItemStack item)Constructor parameters in org.bukkit.event.entity with type arguments of type ItemStack Constructor Description EntityDeathEvent(@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)PlayerDeathEvent(@NotNull Player player, @NotNull List<ItemStack> drops, int droppedExp, int newExp, @Nullable String deathMessage)PlayerDeathEvent(@NotNull Player player, @NotNull List<ItemStack> drops, int droppedExp, @Nullable String deathMessage) -
Uses of ItemStack in org.bukkit.event.inventory
Methods in org.bukkit.event.inventory that return ItemStack Modifier and Type Method Description @Nullable ItemStackInventoryClickEvent. getCurrentItem()Gets the ItemStack currently in the clicked slot.@Nullable ItemStackInventoryClickEvent. getCursor()Gets the current ItemStack on the cursor.@NotNull ItemStackInventoryCreativeEvent. getCursor()@Nullable ItemStackInventoryDragEvent. getCursor()Gets the result cursor after the drag is done.@NotNull ItemStackBrewingStandFuelEvent. getFuel()Gets the ItemStack of the fuel before the amount was subtracted.@NotNull ItemStackFurnaceBurnEvent. getFuel()Gets the fuel ItemStack for this event@NotNull ItemStackInventoryMoveItemEvent. getItem()Gets the ItemStack being moved; if modified, the original item will not be removed from the source inventory.@NotNull ItemStackInventoryDragEvent. getOldCursor()Gets an ItemStack representing the cursor prior to any modifications as a result of this drag.@Nullable ItemStackPrepareAnvilEvent. getResult()Get result item, may be null.Methods in org.bukkit.event.inventory that return types with arguments of type ItemStack Modifier and Type Method Description @NotNull Map<Integer,ItemStack>InventoryDragEvent. getNewItems()Gets all items to be added to the inventory in this drag.Methods in org.bukkit.event.inventory with parameters of type ItemStack Modifier and Type Method Description voidInventoryClickEvent. setCurrentItem(@Nullable ItemStack stack)Sets the ItemStack currently in the clicked slot.voidInventoryClickEvent. setCursor(@Nullable ItemStack stack)Deprecated.This changes the ItemStack in their hand before any calculations are applied to the Inventory, which has a tendency to create inconsistencies between the Player and the server, and to make unexpected changes in the behavior of the clicked Inventory.voidInventoryCreativeEvent. setCursor(@NotNull ItemStack item)voidInventoryDragEvent. setCursor(@Nullable ItemStack newCursor)Sets the result cursor after the drag is done.voidInventoryMoveItemEvent. setItem(@NotNull ItemStack itemStack)Sets the ItemStack being moved; if this is different from the original ItemStack, the original item will not be removed from the source inventory.voidPrepareAnvilEvent. setResult(@Nullable ItemStack result)Constructors in org.bukkit.event.inventory with parameters of type ItemStack Constructor Description BrewingStandFuelEvent(@NotNull Block brewingStand, @NotNull ItemStack fuel, int fuelPower)FurnaceBurnEvent(@NotNull Block furnace, @NotNull ItemStack fuel, int burnTime)FurnaceSmeltEvent(@NotNull Block furnace, @NotNull ItemStack source, @NotNull ItemStack result)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)Constructor parameters in org.bukkit.event.inventory with type arguments of type ItemStack Constructor Description InventoryDragEvent(@NotNull InventoryView what, @Nullable ItemStack newCursor, @NotNull ItemStack oldCursor, boolean right, @NotNull Map<Integer,ItemStack> slots) -
Uses of ItemStack in org.bukkit.event.player
Fields in org.bukkit.event.player declared as ItemStack Modifier and Type Field Description protected ItemStackPlayerInteractEvent. itemMethods in org.bukkit.event.player that return ItemStack Modifier and Type Method Description @NotNull ItemStackPlayerArmorStandManipulateEvent. getArmorStandItem()Returns the item held by the armor stand.@Nullable ItemStackPlayerTakeLecternBookEvent. getBook()Gets the current ItemStack on the lectern.@NotNull ItemStackPlayerItemBreakEvent. getBrokenItem()Gets the item that broke@Nullable ItemStackPlayerInteractEvent. getItem()Returns the item in hand represented by this event@NotNull ItemStackPlayerItemConsumeEvent. getItem()Gets the item that is being consumed.@NotNull ItemStackPlayerItemDamageEvent. getItem()Gets the item being damaged.@NotNull ItemStackPlayerItemMendEvent. getItem()Get theItemStackto be repaired.@NotNull ItemStackPlayerRiptideEvent. getItem()Gets the item containing the used enchantment.@NotNull ItemStackPlayerShearEntityEvent. getItem()Gets the item used to shear the entity.@Nullable ItemStackPlayerBucketEvent. getItemStack()Get the resulting item in hand after the bucket event@Nullable ItemStackPlayerSwapHandItemsEvent. getMainHandItem()Gets the item switched to the main hand.@Nullable ItemStackPlayerSwapHandItemsEvent. getOffHandItem()Gets the item switched to the off hand.@NotNull ItemStackPlayerArmorStandManipulateEvent. getPlayerItem()Returns the item held by the player.Methods in org.bukkit.event.player with parameters of type ItemStack Modifier and Type Method Description voidPlayerItemConsumeEvent. setItem(@Nullable ItemStack item)Set 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.Constructors in org.bukkit.event.player with parameters of type ItemStack Constructor Description PlayerArmorStandManipulateEvent(@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 block, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand)PlayerBucketEvent(@NotNull Player who, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand)Deprecated.PlayerBucketEvent(@NotNull Player who, @NotNull Block block, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand)PlayerBucketFillEvent(@NotNull Player who, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand)Deprecated.PlayerBucketFillEvent(@NotNull Player who, @NotNull Block block, @NotNull Block blockClicked, @NotNull BlockFace blockFace, @NotNull Material bucket, @NotNull ItemStack itemInHand)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)PlayerItemBreakEvent(@NotNull Player player, @NotNull ItemStack brokenItem)PlayerItemConsumeEvent(@NotNull Player player, @NotNull ItemStack item)PlayerItemDamageEvent(@NotNull Player player, @NotNull ItemStack what, int damage)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) -
Uses of ItemStack in org.bukkit.event.world
Methods in org.bukkit.event.world that return types with arguments of type ItemStack Modifier and Type Method Description @NotNull List<ItemStack>LootGenerateEvent. getLoot()Get a mutable list of all loot to be generated.Method parameters in org.bukkit.event.world with type arguments of type ItemStack Modifier and Type Method Description voidLootGenerateEvent. setLoot(@Nullable Collection<ItemStack> loot)Set the loot to be generated.Constructor parameters in org.bukkit.event.world with type arguments of type ItemStack Constructor Description LootGenerateEvent(@NotNull World world, @Nullable Entity entity, @Nullable InventoryHolder inventoryHolder, @NotNull LootTable lootTable, @NotNull LootContext lootContext, @NotNull List<ItemStack> items, boolean plugin) -
Uses of ItemStack in org.bukkit.inventory
Methods in org.bukkit.inventory that return ItemStack Modifier and Type Method Description @NotNull ItemStackItemStack. clone()static @NotNull ItemStackItemStack. deserialize(@NotNull Map<String,Object> args)Required method for configuration serialization@Nullable ItemStackHorseInventory. getArmor()Gets the item in the horse's armor slot.@NotNull ItemStack[]EntityEquipment. getArmorContents()Gets a copy of all worn armor@NotNull ItemStack[]PlayerInventory. getArmorContents()Get all ItemStacks from the armor slots@Nullable ItemStackEntityEquipment. getBoots()Gets a copy of the boots currently being worn by the entity@Nullable ItemStackPlayerInventory. getBoots()Return the ItemStack from the boots slot@Nullable ItemStackEntityEquipment. getChestplate()Gets a copy of the chest plate currently being worn by the entity@Nullable ItemStackPlayerInventory. getChestplate()Return the ItemStack from the chestplate slot@NotNull ItemStack[]Inventory. getContents()Returns all ItemStacks from the inventory@Nullable ItemStackInventoryView. getCursor()Get the item on the cursor of one of the viewing players.@Nullable ItemStackLlamaInventory. getDecor()Gets the item in the llama's decor slot.@NotNull ItemStack[]PlayerInventory. getExtraContents()Get all additional ItemStacks stored in this inventory.@Nullable ItemStackBrewerInventory. getFuel()Get the current fuel for brewing.@Nullable ItemStackFurnaceInventory. getFuel()Get the current fuel.@Nullable ItemStackEntityEquipment. getHelmet()Gets a copy of the helmet currently being worn by the entity@Nullable ItemStackPlayerInventory. getHelmet()Return the ItemStack from the helmet slot@Nullable ItemStackBrewerInventory. getIngredient()Get the current ingredient for brewing.@NotNull ItemStackCookingRecipe. getInput()Get the input material.@NotNull ItemStackStonecuttingRecipe. getInput()Get the input material.@Nullable ItemStackBeaconInventory. getItem()Get the item powering the beacon.@Nullable ItemStackEnchantingInventory. getItem()Get the item being enchanted.@NotNull ItemStackEntityEquipment. getItem(@NotNull EquipmentSlot slot)Gets the ItemStack at the given equipment slot in the inventory.@Nullable ItemStackInventory. getItem(int index)Returns the ItemStack found in the slot at the given index@Nullable ItemStackInventoryView. getItem(int slot)Gets one item in this inventory view by its raw slot ID.@NotNull ItemStackPlayerInventory. getItem(@NotNull EquipmentSlot slot)Gets the ItemStack at the given equipment slot in the inventory.@NotNull ItemStackEntityEquipment. getItemInHand()Deprecated.entities can duel wield now use the methods for the specific hand instead@NotNull ItemStackPlayerInventory. getItemInHand()Deprecated.players can duel wield now use the methods for the specific hand instead@NotNull ItemStackEntityEquipment. getItemInMainHand()Gets a copy of the item the entity is currently holding in their main hand.@NotNull ItemStackPlayerInventory. getItemInMainHand()Gets a copy of the item the player is currently holding in their main hand.@NotNull ItemStackEntityEquipment. getItemInOffHand()Gets a copy of the item the entity is currently holding in their off hand.@NotNull ItemStackPlayerInventory. getItemInOffHand()Gets a copy of the item the player is currently holding in their off hand.@NotNull ItemStackRecipeChoice.ExactChoice. getItemStack()Deprecated.@NotNull ItemStackRecipeChoice. getItemStack()Deprecated.for compatability only@NotNull ItemStackRecipeChoice.MaterialChoice. getItemStack()@Nullable ItemStackEntityEquipment. getLeggings()Gets a copy of the leggings currently being worn by the entity@Nullable ItemStackPlayerInventory. getLeggings()Return the ItemStack from the leg slot@NotNull ItemStack[]CraftingInventory. getMatrix()Get the contents of the crafting matrix.@NotNull ItemStackCookingRecipe. getResult()Get the result of this recipe.@Nullable ItemStackCraftingInventory. getResult()Check what item is in the result slot of this crafting inventory.@Nullable ItemStackFurnaceInventory. getResult()Get the current item in the result slot.@NotNull ItemStackMerchantRecipe. getResult()@NotNull ItemStackRecipe. getResult()Get the result of this recipe.@NotNull ItemStackShapedRecipe. getResult()Get the result.@NotNull ItemStackShapelessRecipe. getResult()Get the result of this recipe.@NotNull ItemStackStonecuttingRecipe. getResult()Get the result of this recipe.@Nullable ItemStackAbstractHorseInventory. getSaddle()Gets the item in the horse's saddle slot.@Nullable ItemStackEnchantingInventory. getSecondary()Get the secondary item being used for the enchant.@Nullable ItemStackFurnaceInventory. getSmelting()Get the item currently smelting.@NotNull ItemStack[]Inventory. getStorageContents()Return the contents from the section of the inventory where items can reasonably be expected to be stored.Methods in org.bukkit.inventory that return types with arguments of type ItemStack Modifier and Type Method Description @NotNull HashMap<Integer,ItemStack>Inventory. addItem(@NotNull ItemStack... items)Stores the given ItemStacks in the inventory.@NotNull HashMap<Integer,? extends ItemStack>Inventory. all(@NotNull Material material)Returns a HashMap with all slots and ItemStacks in the inventory with the given Material.@NotNull HashMap<Integer,? extends ItemStack>Inventory. all(@Nullable ItemStack item)Finds all slots in the inventory containing any ItemStacks with the given ItemStack.@NotNull List<ItemStack>RecipeChoice.ExactChoice. getChoices()Deprecated.@NotNull List<ItemStack>ShapelessRecipe. getIngredientList()Get the list of ingredients used for this recipe.@NotNull Map<Character,ItemStack>ShapedRecipe. getIngredientMap()Get a copy of the ingredients map.@NotNull List<ItemStack>MerchantRecipe. getIngredients()@NotNull ListIterator<ItemStack>Inventory. iterator()@NotNull ListIterator<ItemStack>Inventory. iterator(int index)Returns an iterator starting at the given index.@NotNull HashMap<Integer,ItemStack>Inventory. removeItem(@NotNull ItemStack... items)Removes the given ItemStacks from the inventory.Methods in org.bukkit.inventory with parameters of type ItemStack Modifier and Type Method Description voidMerchantRecipe. addIngredient(@NotNull ItemStack item)@NotNull HashMap<Integer,ItemStack>Inventory. addItem(@NotNull ItemStack... items)Stores the given ItemStacks in the inventory.@NotNull HashMap<Integer,? extends ItemStack>Inventory. all(@Nullable ItemStack item)Finds all slots in the inventory containing any ItemStacks with the given ItemStack.@Nullable ItemMetaItemFactory. asMetaFor(@NotNull ItemMeta meta, @NotNull ItemStack stack)Returns an appropriate item meta for the specified stack.booleanInventory. contains(@Nullable ItemStack item)Checks if the inventory contains any ItemStacks matching the given ItemStack.booleanInventory. contains(@Nullable ItemStack item, int amount)Checks 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.intInventory. first(@NotNull ItemStack item)Returns the first slot in the inventory containing an ItemStack with the given stack.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.booleanItemStack. isSimilar(@Nullable ItemStack stack)This method is the same as equals, but does not consider stack size (amount).voidInventory. remove(@NotNull ItemStack item)Removes all stacks in the inventory matching the given stack.@NotNull HashMap<Integer,ItemStack>Inventory. removeItem(@NotNull ItemStack... items)Removes the given ItemStacks from the inventory.voidHorseInventory. setArmor(@Nullable ItemStack stack)Sets 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 slotsvoidEntityEquipment. setBoots(@Nullable ItemStack boots)Sets the boots worn by the entityvoidPlayerInventory. setBoots(@Nullable ItemStack boots)Put the given ItemStack into the boots slot.voidEntityEquipment. setChestplate(@Nullable ItemStack chestplate)Sets the chest plate worn by the entityvoidPlayerInventory. setChestplate(@Nullable ItemStack chestplate)Put the given ItemStack into the chestplate slot.voidInventory. setContents(@NotNull ItemStack[] items)Completely replaces the inventory's contents.voidInventoryView. setCursor(@Nullable ItemStack item)Sets the item on the cursor of one of the viewing players.voidLlamaInventory. setDecor(@Nullable ItemStack stack)Sets 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.voidBrewerInventory. setFuel(@Nullable ItemStack fuel)Set the current fuel for brewing.voidFurnaceInventory. setFuel(@Nullable ItemStack stack)Set the current fuel.voidEntityEquipment. setHelmet(@Nullable ItemStack helmet)Sets the helmet worn by the entityvoidPlayerInventory. setHelmet(@Nullable ItemStack helmet)Put the given ItemStack into the helmet slot.voidBrewerInventory. setIngredient(@Nullable ItemStack ingredient)Set the current ingredient for brewing.voidBeaconInventory. setItem(@Nullable ItemStack item)Set the item powering the beacon.voidEnchantingInventory. setItem(@Nullable ItemStack item)Set the item being enchanted.voidEntityEquipment. setItem(@NotNull EquipmentSlot slot, @Nullable ItemStack item)Stores the ItemStack at the given equipment slot in the inventory.voidInventory. setItem(int index, @Nullable ItemStack item)Stores the ItemStack at the given index of the inventory.voidInventoryView. setItem(int slot, @Nullable ItemStack item)Sets one item in this inventory view by its raw slot ID.voidPlayerInventory. setItem(int index, @Nullable ItemStack item)Stores 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.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.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 entityvoidPlayerInventory. setLeggings(@Nullable ItemStack leggings)Put the given ItemStack into the leg slot.voidCraftingInventory. setMatrix(@NotNull ItemStack[] contents)Replace the contents of the crafting matrixvoidCraftingInventory. setResult(@Nullable ItemStack newResult)Set the item in the result slot of the crafting inventory.voidFurnaceInventory. setResult(@Nullable ItemStack stack)Set the current item in the result slot.voidAbstractHorseInventory. setSaddle(@Nullable ItemStack stack)Sets the item in the horse's saddle slot.voidEnchantingInventory. setSecondary(@Nullable ItemStack item)Set the secondary item being used for the enchant.voidFurnaceInventory. setSmelting(@Nullable ItemStack stack)Set the item currently smelting.voidInventory. setStorageContents(@NotNull ItemStack[] items)Put the given ItemStacks into the storage slotsbooleanRecipeChoice.ExactChoice. test(@NotNull ItemStack t)Deprecated.booleanRecipeChoice.MaterialChoice. test(@NotNull ItemStack t)booleanRecipeChoice. test(@NotNull ItemStack itemStack)Method parameters in org.bukkit.inventory with type arguments of type ItemStack Modifier and Type Method Description voidMerchantRecipe. setIngredients(@NotNull List<ItemStack> ingredients)Constructors in org.bukkit.inventory with parameters of type ItemStack Constructor Description BlastingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime)BlastingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, float experience, int cookingTime)CampfireRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime)CampfireRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, float experience, int cookingTime)CookingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime)Create a cooking recipe to craft the specified ItemStack.CookingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, float experience, int cookingTime)Create a cooking recipe to craft the specified ItemStack.ExactChoice(@NotNull ItemStack stack)Deprecated.ExactChoice(@NotNull ItemStack... stacks)Deprecated.FurnaceRecipe(@NotNull ItemStack result, @NotNull Material source)Deprecated.FurnaceRecipe(@NotNull ItemStack result, @NotNull MaterialData source)Deprecated.FurnaceRecipe(@NotNull ItemStack result, @NotNull MaterialData source, float experience)Deprecated.FurnaceRecipe(@NotNull ItemStack result, @NotNull Material source, int data)Deprecated.FurnaceRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice input, float experience, int cookingTime)Create a furnace recipe to craft the specified ItemStack.FurnaceRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, float experience, int cookingTime)Create a furnace recipe to craft the specified ItemStack.FurnaceRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull Material source, int data, float experience, int cookingTime)Deprecated.ItemStack(@NotNull ItemStack stack)Creates a new item stack derived from the specified 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)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.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 Constructor Description ExactChoice(@NotNull List<ItemStack> choices)Deprecated. -
Uses of ItemStack in org.bukkit.inventory.meta
Methods in org.bukkit.inventory.meta that return types with arguments of type ItemStack Modifier and Type Method Description @NotNull List<ItemStack>CrossbowMeta. getChargedProjectiles()Returns an immutable list of the projectiles charged on this item.Methods in org.bukkit.inventory.meta with parameters of type ItemStack Modifier and Type Method Description voidCrossbowMeta. addChargedProjectile(@NotNull ItemStack item)Adds a charged projectile to this item.Method parameters in org.bukkit.inventory.meta with type arguments of type ItemStack Modifier and Type Method Description voidCrossbowMeta. setChargedProjectiles(@Nullable List<ItemStack> projectiles)Sets the projectiles charged on this item. -
Uses of ItemStack in org.bukkit.loot
Methods in org.bukkit.loot that return types with arguments of type ItemStack Modifier and Type Method Description @NotNull Collection<ItemStack>LootTable. populateLoot(@NotNull Random random, @NotNull LootContext context)Returns a mutable list of loot generated by this LootTable. -
Uses of ItemStack in org.bukkit.material
Methods in org.bukkit.material that return ItemStack Modifier and Type Method Description ItemStackMaterialData. toItemStack()Deprecated.this method creates an ItemStack of size 0 which is not generally useful.ItemStackMaterialData. toItemStack(int amount)Deprecated.Creates a new ItemStack based on this MaterialData -
Uses of ItemStack in org.bukkit.potion
Methods in org.bukkit.potion that return ItemStack Modifier and Type Method Description @NotNull ItemStackPotion. 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 Modifier and Type Method Description voidPotion. apply(@NotNull ItemStack to)Deprecated.Applies the effects of this potion to the givenItemStack.static @NotNull PotionPotion. fromItemStack(@NotNull ItemStack item)Deprecated.
-