Uses of Class
org.bukkit.inventory.ItemStack
Package | Description |
---|---|
org.bukkit |
More generalized classes in the API.
|
org.bukkit.block |
Classes used to manipulate the voxels in a
world ,
including special states. |
org.bukkit.configuration |
Classes dedicated to handling a plugin's runtime configuration.
|
org.bukkit.enchantments |
Classes relating to the specialized enhancements to
item stacks , as part of the meta data . |
org.bukkit.entity |
Interfaces for non-voxel objects that can exist in a
world , including all players, monsters, projectiles, etc. |
org.bukkit.event.block | |
org.bukkit.event.enchantment |
Events triggered from an enchantment table . |
org.bukkit.event.entity | |
org.bukkit.event.inventory | |
org.bukkit.event.player | |
org.bukkit.inventory |
Classes involved in manipulating player inventories and item interactions.
|
org.bukkit.material |
Classes that represents various voxel types and states.
|
org.bukkit.potion |
Classes to represent various
potion
properties and manipulation. |
-
Uses of ItemStack in org.bukkit
Methods in org.bukkit that return ItemStack Modifier and Type Method Description ItemStack
UnsafeValues. modifyItemStack(ItemStack stack, java.lang.String arguments)
Deprecated.Methods in org.bukkit with parameters of type ItemStack Modifier and Type Method Description Item
World. dropItem(Location location, ItemStack item)
Drops an item at the specifiedLocation
Item
World. dropItemNaturally(Location location, ItemStack item)
Drops an item at the specifiedLocation
with a random offsetstatic java.util.List<Recipe>
Bukkit. getRecipesFor(ItemStack result)
Get a list of all recipes for a given item.java.util.List<Recipe>
Server. getRecipesFor(ItemStack result)
Get a list of all recipes for a given item.ItemStack
UnsafeValues. modifyItemStack(ItemStack stack, java.lang.String arguments)
Deprecated. -
Uses of ItemStack in org.bukkit.block
Methods in org.bukkit.block that return types with arguments of type ItemStack Modifier and Type Method Description java.util.Collection<ItemStack>
Block. getDrops()
Returns a list of items which would drop by destroying this blockjava.util.Collection<ItemStack>
Block. getDrops(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 boolean
Block. breakNaturally(ItemStack tool)
Breaks the block and spawns items as if a player had digged it with a specific tooljava.util.Collection<ItemStack>
Block. getDrops(ItemStack tool)
Returns a list of items which would drop by destroying this block with a specific tool -
Uses of ItemStack in org.bukkit.configuration
Methods in org.bukkit.configuration that return ItemStack Modifier and Type Method Description ItemStack
ConfigurationSection. getItemStack(java.lang.String path)
Gets the requested ItemStack by path.ItemStack
ConfigurationSection. getItemStack(java.lang.String path, ItemStack def)
Gets the requestedItemStack
by path, returning a default value if not found.ItemStack
MemorySection. getItemStack(java.lang.String path)
ItemStack
MemorySection. getItemStack(java.lang.String path, ItemStack def)
Methods in org.bukkit.configuration with parameters of type ItemStack Modifier and Type Method Description ItemStack
ConfigurationSection. getItemStack(java.lang.String path, ItemStack def)
Gets the requestedItemStack
by path, returning a default value if not found.ItemStack
MemorySection. getItemStack(java.lang.String path, ItemStack def)
-
Uses of ItemStack in org.bukkit.enchantments
Methods in org.bukkit.enchantments with parameters of type ItemStack Modifier and Type Method Description abstract boolean
Enchantment. canEnchantItem(ItemStack item)
Checks if this Enchantment may be applied to the givenItemStack
.boolean
EnchantmentWrapper. canEnchantItem(ItemStack item)
boolean
EnchantmentTarget. includes(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 ItemStack
ArmorStand. getBoots()
Returns the item currently being worn by the armor stand on its feetItemStack
ArmorStand. getChestplate()
Returns the item currently being worn by the armor stand on its chestItemStack
ArmorStand. getHelmet()
Returns the item currently being worn by the armor stand on its headItemStack
ItemFrame. getItem()
Get the item in this frameItemStack
ThrownPotion. getItem()
Returns a copy of the ItemStack for this thrown potion.ItemStack
ArmorStand. getItemInHand()
Returns the item the armor stand is currently holdingItemStack
HumanEntity. getItemInHand()
Returns the ItemStack currently in your hand, can be empty.ItemStack
HumanEntity. getItemOnCursor()
Returns the ItemStack currently on your cursor, can be empty.ItemStack
Item. getItemStack()
Gets the item stack associated with this item drop.ItemStack
ArmorStand. getLeggings()
Returns the item currently being worn by the armor stand on its legsMethods in org.bukkit.entity with parameters of type ItemStack Modifier and Type Method Description void
ArmorStand. setBoots(ItemStack item)
Sets the item currently being worn by the armor stand on its feetvoid
ArmorStand. setChestplate(ItemStack item)
Sets the item currently being worn by the armor stand on its chestvoid
ArmorStand. setHelmet(ItemStack item)
Sets the item currently being worn by the armor stand on its headvoid
ItemFrame. setItem(ItemStack item)
Set the item in this framevoid
ThrownPotion. setItem(ItemStack item)
Set the ItemStack for this thrown potion.void
ArmorStand. setItemInHand(ItemStack item)
Sets the item the armor stand is currently holdingvoid
HumanEntity. setItemInHand(ItemStack item)
Sets the item to the given ItemStack, this will replace whatever the user was holding.void
HumanEntity. setItemOnCursor(ItemStack item)
Sets the item to the given ItemStack, this will replace whatever the user was moving.void
Item. setItemStack(ItemStack stack)
Sets the item stack associated with this item drop.void
ArmorStand. setLeggings(ItemStack item)
Sets the item currently being worn by the armor stand on its legs -
Uses of ItemStack in org.bukkit.event.block
Fields in org.bukkit.event.block declared as ItemStack Modifier and Type Field Description protected ItemStack
BlockPlaceEvent. itemInHand
Methods in org.bukkit.event.block that return ItemStack Modifier and Type Method Description ItemStack
BlockDispenseEvent. getItem()
Gets the item that is being dispensed.ItemStack
BlockDamageEvent. getItemInHand()
Gets the ItemStack for the item currently in the player's hand.ItemStack
BlockPlaceEvent. getItemInHand()
Gets the item in the player's hand when they placed the block.Methods in org.bukkit.event.block with parameters of type ItemStack Modifier and Type Method Description void
BlockDispenseEvent. setItem(ItemStack item)
Sets the item being dispensed.Constructors in org.bukkit.event.block with parameters of type ItemStack Constructor Description BlockDamageEvent(Player player, Block block, ItemStack itemInHand, boolean instaBreak)
BlockDispenseEvent(Block block, ItemStack dispensed, Vector velocity)
BlockMultiPlaceEvent(java.util.List<BlockState> states, Block clicked, ItemStack itemInHand, Player thePlayer, boolean canBuild)
BlockPlaceEvent(Block placedBlock, BlockState replacedBlockState, Block placedAgainst, ItemStack itemInHand, Player thePlayer, boolean canBuild)
-
Uses of ItemStack in org.bukkit.event.enchantment
Methods in org.bukkit.event.enchantment that return ItemStack Modifier and Type Method Description ItemStack
EnchantItemEvent. getItem()
Gets the item to be enchanted (can be modified)ItemStack
PrepareItemEnchantEvent. getItem()
Gets the item to be enchanted (can be modified)Constructors in org.bukkit.event.enchantment with parameters of type ItemStack Constructor Description EnchantItemEvent(Player enchanter, InventoryView view, Block table, ItemStack item, int level, java.util.Map<Enchantment,java.lang.Integer> enchants, int i)
PrepareItemEnchantEvent(Player enchanter, InventoryView view, Block table, ItemStack item, int[] levelsOffered, int bonus)
-
Uses of ItemStack in org.bukkit.event.entity
Methods in org.bukkit.event.entity that return ItemStack Modifier and Type Method Description ItemStack
EntityShootBowEvent. getBow()
Gets the bow ItemStack used to fire the arrow.Methods in org.bukkit.event.entity that return types with arguments of type ItemStack Modifier and Type Method Description java.util.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 EntityShootBowEvent(LivingEntity shooter, ItemStack bow, Projectile projectile, float force)
Constructor parameters in org.bukkit.event.entity with type arguments of type ItemStack Constructor Description EntityDeathEvent(LivingEntity entity, java.util.List<ItemStack> drops)
EntityDeathEvent(LivingEntity what, java.util.List<ItemStack> drops, int droppedExp)
PlayerDeathEvent(Player player, java.util.List<ItemStack> drops, int droppedExp, int newExp, int newTotalExp, int newLevel, java.lang.String deathMessage)
PlayerDeathEvent(Player player, java.util.List<ItemStack> drops, int droppedExp, int newExp, java.lang.String deathMessage)
PlayerDeathEvent(Player player, java.util.List<ItemStack> drops, int droppedExp, java.lang.String deathMessage)
-
Uses of ItemStack in org.bukkit.event.inventory
Methods in org.bukkit.event.inventory that return ItemStack Modifier and Type Method Description ItemStack
InventoryClickEvent. getCurrentItem()
Gets the ItemStack currently in the clicked slot.ItemStack
InventoryClickEvent. getCursor()
Gets the current ItemStack on the cursor.ItemStack
InventoryCreativeEvent. getCursor()
ItemStack
InventoryDragEvent. getCursor()
Gets the result cursor after the drag is done.ItemStack
FurnaceBurnEvent. getFuel()
Gets the fuel ItemStack for this eventItemStack
InventoryMoveItemEvent. getItem()
Gets the ItemStack being moved; if modified, the original item will not be removed from the source inventory.ItemStack
InventoryDragEvent. getOldCursor()
Gets an ItemStack representing the cursor prior to any modifications as a result of this drag.ItemStack
FurnaceSmeltEvent. getResult()
Gets the resultant ItemStack for this eventItemStack
FurnaceSmeltEvent. getSource()
Gets the smelted ItemStack for this eventMethods in org.bukkit.event.inventory that return types with arguments of type ItemStack Modifier and Type Method Description java.util.Map<java.lang.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 void
InventoryClickEvent. setCurrentItem(ItemStack stack)
Sets the ItemStack currently in the clicked slot.void
InventoryClickEvent. setCursor(ItemStack stack)
Deprecated.This changes the ItemStack in their hand before any calculations are applied to the Inventory, which has a tendency to create inconsistencies between the Player and the server, and to make unexpected changes in the behavior of the clicked Inventory.void
InventoryCreativeEvent. setCursor(ItemStack item)
void
InventoryDragEvent. setCursor(ItemStack newCursor)
Sets the result cursor after the drag is done.void
InventoryMoveItemEvent. setItem(ItemStack itemStack)
Sets the ItemStack being moved; if this is different from the original ItemStack, the original item will not be removed from the source inventory.void
FurnaceSmeltEvent. setResult(ItemStack result)
Sets the resultant ItemStack for this eventConstructors in org.bukkit.event.inventory with parameters of type ItemStack Constructor Description FurnaceBurnEvent(Block furnace, ItemStack fuel, int burnTime)
FurnaceSmeltEvent(Block furnace, ItemStack source, ItemStack result)
InventoryCreativeEvent(InventoryView what, InventoryType.SlotType type, int slot, ItemStack newItem)
InventoryDragEvent(InventoryView what, ItemStack newCursor, ItemStack oldCursor, boolean right, java.util.Map<java.lang.Integer,ItemStack> slots)
InventoryMoveItemEvent(Inventory sourceInventory, ItemStack itemStack, Inventory destinationInventory, boolean didSourceInitiate)
Constructor parameters in org.bukkit.event.inventory with type arguments of type ItemStack Constructor Description InventoryDragEvent(InventoryView what, ItemStack newCursor, ItemStack oldCursor, boolean right, java.util.Map<java.lang.Integer,ItemStack> slots)
-
Uses of ItemStack in org.bukkit.event.player
Fields in org.bukkit.event.player declared as ItemStack Modifier and Type Field Description protected ItemStack
PlayerInteractEvent. item
Methods in org.bukkit.event.player that return ItemStack Modifier and Type Method Description ItemStack
PlayerArmorStandManipulateEvent. getArmorStandItem()
Returns the item held by the armor stand.ItemStack
PlayerItemBreakEvent. getBrokenItem()
Gets the item that brokeItemStack
PlayerInteractEvent. getItem()
Returns the item in hand represented by this eventItemStack
PlayerItemConsumeEvent. getItem()
Gets the item that is being consumed.ItemStack
PlayerItemDamageEvent. getItem()
ItemStack
PlayerBucketEvent. getItemStack()
Get the resulting item in hand after the bucket eventItemStack
PlayerArmorStandManipulateEvent. getPlayerItem()
Returns the item held by the player.Methods in org.bukkit.event.player with parameters of type ItemStack Modifier and Type Method Description void
PlayerItemConsumeEvent. setItem(ItemStack item)
Set the item being consumedvoid
PlayerBucketEvent. setItemStack(ItemStack itemStack)
Set the item in hand after the eventConstructors in org.bukkit.event.player with parameters of type ItemStack Constructor Description PlayerArmorStandManipulateEvent(Player who, ArmorStand clickedEntity, ItemStack playerItem, ItemStack armorStandItem, EquipmentSlot slot)
PlayerBucketEmptyEvent(Player who, Block blockClicked, BlockFace blockFace, Material bucket, ItemStack itemInHand)
PlayerBucketEvent(Player who, Block blockClicked, BlockFace blockFace, Material bucket, ItemStack itemInHand)
PlayerBucketFillEvent(Player who, Block blockClicked, BlockFace blockFace, Material bucket, ItemStack itemInHand)
PlayerInteractEvent(Player who, Action action, ItemStack item, Block clickedBlock, BlockFace clickedFace)
PlayerItemBreakEvent(Player player, ItemStack brokenItem)
PlayerItemConsumeEvent(Player player, ItemStack item)
PlayerItemDamageEvent(Player player, ItemStack what, int damage)
-
Uses of ItemStack in org.bukkit.inventory
Methods in org.bukkit.inventory that return ItemStack Modifier and Type Method Description ItemStack
ItemStack. clone()
static ItemStack
ItemStack. deserialize(java.util.Map<java.lang.String,java.lang.Object> args)
Required method for configuration serializationItemStack
HorseInventory. getArmor()
Gets the item in the horse's armor slot.ItemStack[]
EntityEquipment. getArmorContents()
Gets a copy of all worn armorItemStack[]
PlayerInventory. getArmorContents()
Get all ItemStacks from the armor slotsItemStack
EntityEquipment. getBoots()
Gets a copy of the boots currently being worn by the entityItemStack
PlayerInventory. getBoots()
Return the ItemStack from the boots slotItemStack
EntityEquipment. getChestplate()
Gets a copy of the chest plate currently being worn by the entityItemStack
PlayerInventory. getChestplate()
Return the ItemStack from the chestplate slotItemStack[]
Inventory. getContents()
Returns all ItemStacks from the inventoryItemStack
InventoryView. getCursor()
Get the item on the cursor of one of the viewing players.ItemStack
FurnaceInventory. getFuel()
Get the current fuel.ItemStack
EntityEquipment. getHelmet()
Gets a copy of the helmet currently being worn by the entityItemStack
PlayerInventory. getHelmet()
Return the ItemStack from the helmet slotItemStack
BrewerInventory. getIngredient()
Get the current ingredient for brewing.ItemStack
FurnaceRecipe. getInput()
Get the input material.ItemStack
BeaconInventory. getItem()
Get the item powering the beacon.ItemStack
EnchantingInventory. getItem()
Get the item being enchanted.ItemStack
Inventory. getItem(int index)
Returns the ItemStack found in the slot at the given indexItemStack
InventoryView. getItem(int slot)
Gets one item in this inventory view by its raw slot ID.ItemStack
EntityEquipment. getItemInHand()
Gets a copy of the item the entity is currently holdingItemStack
PlayerInventory. getItemInHand()
Returns the ItemStack currently holdItemStack
EntityEquipment. getLeggings()
Gets a copy of the leggings currently being worn by the entityItemStack
PlayerInventory. getLeggings()
Return the ItemStack from the leg slotItemStack[]
CraftingInventory. getMatrix()
Get the contents of the crafting matrix.ItemStack
CraftingInventory. getResult()
Check what item is in the result slot of this crafting inventory.ItemStack
FurnaceInventory. getResult()
Get the current item in the result slot.ItemStack
FurnaceRecipe. getResult()
Get the result of this recipe.ItemStack
Recipe. getResult()
Get the result of this recipe.ItemStack
ShapedRecipe. getResult()
Get the result.ItemStack
ShapelessRecipe. getResult()
Get the result of this recipe.ItemStack
HorseInventory. getSaddle()
Gets the item in the horse's saddle slot.ItemStack
EnchantingInventory. getSecondary()
Get the secondary item being used for the enchant.ItemStack
FurnaceInventory. getSmelting()
Get the item currently smelting.Methods in org.bukkit.inventory that return types with arguments of type ItemStack Modifier and Type Method Description java.util.HashMap<java.lang.Integer,ItemStack>
Inventory. addItem(ItemStack... items)
Stores the given ItemStacks in the inventory.java.util.HashMap<java.lang.Integer,? extends ItemStack>
Inventory. all(int materialId)
Deprecated.Magic valuejava.util.HashMap<java.lang.Integer,? extends ItemStack>
Inventory. all(ItemStack item)
Finds all slots in the inventory containing any ItemStacks with the given ItemStack.java.util.HashMap<java.lang.Integer,? extends ItemStack>
Inventory. all(Material material)
Returns a HashMap with all slots and ItemStacks in the inventory with the given Material.java.util.List<ItemStack>
ShapelessRecipe. getIngredientList()
Get the list of ingredients used for this recipe.java.util.Map<java.lang.Character,ItemStack>
ShapedRecipe. getIngredientMap()
Get a copy of the ingredients map.java.util.ListIterator<ItemStack>
Inventory. iterator()
java.util.ListIterator<ItemStack>
Inventory. iterator(int index)
Returns an iterator starting at the given index.java.util.HashMap<java.lang.Integer,ItemStack>
Inventory. removeItem(ItemStack... items)
Removes the given ItemStacks from the inventory.Methods in org.bukkit.inventory with parameters of type ItemStack Modifier and Type Method Description java.util.HashMap<java.lang.Integer,ItemStack>
Inventory. addItem(ItemStack... items)
Stores the given ItemStacks in the inventory.java.util.HashMap<java.lang.Integer,? extends ItemStack>
Inventory. all(ItemStack item)
Finds all slots in the inventory containing any ItemStacks with the given ItemStack.ItemMeta
ItemFactory. asMetaFor(ItemMeta meta, ItemStack stack)
Returns an appropriate item meta for the specified stack.boolean
Inventory. contains(ItemStack item)
Checks if the inventory contains any ItemStacks matching the given ItemStack.boolean
Inventory. contains(ItemStack item, int amount)
Checks if the inventory contains at least the minimum amount specified of exactly matching ItemStacks.boolean
Inventory. containsAtLeast(ItemStack item, int amount)
Checks if the inventory contains ItemStacks matching the given ItemStack whose amounts sum to at least the minimum amount specified.int
Inventory. first(ItemStack item)
Returns the first slot in the inventory containing an ItemStack with the given stack.boolean
ItemFactory. isApplicable(ItemMeta meta, ItemStack stack)
This method checks the item meta to confirm that it is applicable (no data lost if applied) to the specified ItemStack.boolean
ItemStack. isSimilar(ItemStack stack)
This method is the same as equals, but does not consider stack size (amount).void
Inventory. remove(ItemStack item)
Removes all stacks in the inventory matching the given stack.java.util.HashMap<java.lang.Integer,ItemStack>
Inventory. removeItem(ItemStack... items)
Removes the given ItemStacks from the inventory.void
HorseInventory. setArmor(ItemStack stack)
Sets the item in the horse's armor slot.void
EntityEquipment. setArmorContents(ItemStack[] items)
Sets the entities armor to the provided array of ItemStacksvoid
PlayerInventory. setArmorContents(ItemStack[] items)
Put the given ItemStacks into the armor slotsvoid
EntityEquipment. setBoots(ItemStack boots)
Sets the boots worn by the entityvoid
PlayerInventory. setBoots(ItemStack boots)
Put the given ItemStack into the boots slot.void
EntityEquipment. setChestplate(ItemStack chestplate)
Sets the chest plate worn by the entityvoid
PlayerInventory. setChestplate(ItemStack chestplate)
Put the given ItemStack into the chestplate slot.void
Inventory. setContents(ItemStack[] items)
Completely replaces the inventory's contents.void
InventoryView. setCursor(ItemStack item)
Sets the item on the cursor of one of the viewing players.void
FurnaceInventory. setFuel(ItemStack stack)
Set the current fuel.void
EntityEquipment. setHelmet(ItemStack helmet)
Sets the helmet worn by the entityvoid
PlayerInventory. setHelmet(ItemStack helmet)
Put the given ItemStack into the helmet slot.void
BrewerInventory. setIngredient(ItemStack ingredient)
Set the current ingredient for brewing.void
BeaconInventory. setItem(ItemStack item)
Set the item powering the beacon.void
EnchantingInventory. setItem(ItemStack item)
Set the item being enchanted.void
Inventory. setItem(int index, ItemStack item)
Stores the ItemStack at the given index of the inventory.void
InventoryView. setItem(int slot, ItemStack item)
Sets one item in this inventory view by its raw slot ID.void
PlayerInventory. setItem(int index, ItemStack item)
Stores the ItemStack at the given index of the inventory.void
EntityEquipment. setItemInHand(ItemStack stack)
Sets the item the entity is holdingvoid
PlayerInventory. setItemInHand(ItemStack stack)
Sets the item in handvoid
EntityEquipment. setLeggings(ItemStack leggings)
Sets the leggings worn by the entityvoid
PlayerInventory. setLeggings(ItemStack leggings)
Put the given ItemStack into the leg slot.void
CraftingInventory. setMatrix(ItemStack[] contents)
Replace the contents of the crafting matrixvoid
CraftingInventory. setResult(ItemStack newResult)
Set the item in the result slot of the crafting inventory.void
FurnaceInventory. setResult(ItemStack stack)
Set the current item in the result slot.void
HorseInventory. setSaddle(ItemStack stack)
Sets the item in the horse's saddle slot.void
EnchantingInventory. setSecondary(ItemStack item)
Set the secondary item being used for the enchant.void
FurnaceInventory. setSmelting(ItemStack stack)
Set the item currently smelting.Constructors in org.bukkit.inventory with parameters of type ItemStack Constructor Description FurnaceRecipe(ItemStack result, Material source)
Create a furnace recipe to craft the specified ItemStack.FurnaceRecipe(ItemStack result, MaterialData source)
Create a furnace recipe to craft the specified ItemStack.FurnaceRecipe(ItemStack result, Material source, int data)
Deprecated.Magic valueItemStack(ItemStack stack)
Creates a new item stack derived from the specified stackShapedRecipe(ItemStack result)
Create a shaped recipe to craft the specified ItemStack.ShapelessRecipe(ItemStack result)
Create a shapeless recipe to craft the specified ItemStack. -
Uses of ItemStack in org.bukkit.material
Methods in org.bukkit.material that return ItemStack Modifier and Type Method Description ItemStack
MaterialData. toItemStack()
Creates a new ItemStack based on this MaterialDataItemStack
MaterialData. toItemStack(int amount)
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 ItemStack
Potion. toItemStack(int amount)
Converts this potion to anItemStack
with the specified amount and a correct damage value.Methods in org.bukkit.potion with parameters of type ItemStack Modifier and Type Method Description void
Potion. apply(ItemStack to)
Applies the effects of this potion to the givenItemStack
.static Potion
Potion. fromItemStack(ItemStack item)