Package org.bukkit.inventory
Interface EntityEquipment
public interface EntityEquipment
An interface to a creatures inventory
- 
Method SummaryModifier and TypeMethodDescriptionvoidclear()Clears the entity of all armor and held itemsGets all ItemStacks from the armor slots.getBoots()Gets a copy of the boots currently being worn by the entityfloatGets the chance of the boots being dropped upon this creature's death.Gets a copy of the chest plate currently being worn by the entityfloatGets the chance of the chest plate being dropped upon this creature's death.Gets a copy of the helmet currently being worn by the entityfloatGets the chance of the helmet being dropped upon this creature's death.Get the entity this EntityEquipment belongs togetItem(EquipmentSlot slot) Gets the ItemStack at the given equipment slot in the inventory.Deprecated.entities can duel wield now use the methods for the specific hand insteadfloatDeprecated.entities can duel wield now use the methods for the specific hand insteadGets a copy of the item the entity is currently holding in their main hand.floatGets the chance of the main hand item being dropped upon this creature's death.Gets a copy of the item the entity is currently holding in their off hand.floatGets the chance of the off hand item being dropped upon this creature's death.Gets a copy of the leggings currently being worn by the entityfloatGets the chance of the leggings being dropped upon this creature's death.voidsetArmorContents(ItemStack[] items) Sets the entities armor to the provided array of ItemStacksvoidSets the boots worn by the entityvoidSets the boots worn by the entityvoidsetBootsDropChance(float chance) Sets the chance of the boots being dropped upon this creature's death.voidsetChestplate(ItemStack chestplate) Sets the chest plate worn by the entityvoidsetChestplate(ItemStack chestplate, boolean silent) Sets the chest plate worn by the entityvoidsetChestplateDropChance(float chance) Sets the chance of the chest plate being dropped upon this creature's death.voidSets the helmet worn by the entityvoidSets the helmet worn by the entityvoidsetHelmetDropChance(float chance) Sets the chance of the helmet being dropped upon this creature's death.voidsetItem(EquipmentSlot slot, ItemStack item) Stores the ItemStack at the given equipment slot in the inventory.voidsetItem(EquipmentSlot slot, ItemStack item, boolean silent) Stores the ItemStack at the given equipment slot in the inventory.voidsetItemInHand(ItemStack stack) Deprecated.entities can duel wield now use the methods for the specific hand insteadvoidsetItemInHandDropChance(float chance) Deprecated.entities can duel wield now use the methods for the specific hand insteadvoidsetItemInMainHand(ItemStack item) Sets the item the entity is holding in their main hand.voidsetItemInMainHand(ItemStack item, boolean silent) Sets the item the entity is holding in their main hand.voidsetItemInMainHandDropChance(float chance) Sets the chance of the item this creature is currently holding in their main hand being dropped upon this creature's death.voidsetItemInOffHand(ItemStack item) Sets the item the entity is holding in their off hand.voidsetItemInOffHand(ItemStack item, boolean silent) Sets the item the entity is holding in their off hand.voidsetItemInOffHandDropChance(float chance) Sets the chance of the off hand item being dropped upon this creature's death.voidsetLeggings(ItemStack leggings) Sets the leggings worn by the entityvoidsetLeggings(ItemStack leggings, boolean silent) Sets the leggings worn by the entityvoidsetLeggingsDropChance(float chance) Sets the chance of the leggings being dropped upon this creature's death.
- 
Method Details- 
setItemStores the ItemStack at the given equipment slot in the inventory.- Parameters:
- slot- the slot to put the ItemStack
- item- the ItemStack to set
 
- 
setItemStores the ItemStack at the given equipment slot in the inventory.- Parameters:
- slot- the slot to put the ItemStack
- item- the ItemStack to set
- silent- whether or not the equip sound should be silenced
 
- 
getItemGets the ItemStack at the given equipment slot in the inventory.- Parameters:
- slot- the slot to get the ItemStack
- Returns:
- the ItemStack in the given slot
 
- 
getItemInMainHandGets a copy of the item the entity is currently holding in their main hand.- Returns:
- the currently held item
 
- 
setItemInMainHandSets the item the entity is holding in their main hand.- Parameters:
- item- The item to put into the entities hand
 
- 
setItemInMainHandSets the item the entity is holding in their main hand.- Parameters:
- item- The item to put into the entities hand
- silent- whether or not the equip sound should be silenced
 
- 
getItemInOffHandGets a copy of the item the entity is currently holding in their off hand.- Returns:
- the currently held item
 
- 
setItemInOffHandSets the item the entity is holding in their off hand.- Parameters:
- item- The item to put into the entities hand
 
- 
setItemInOffHandSets the item the entity is holding in their off hand.- Parameters:
- item- The item to put into the entities hand
- silent- whether or not the equip sound should be silenced
 
- 
getItemInHandDeprecated.entities can duel wield now use the methods for the specific hand insteadGets a copy of the item the entity is currently holding- Returns:
- the currently held item
- See Also:
 
- 
setItemInHandDeprecated.entities can duel wield now use the methods for the specific hand insteadSets the item the entity is holding- Parameters:
- stack- The item to put into the entities hand
- See Also:
 
- 
getHelmetGets a copy of the helmet currently being worn by the entity- Returns:
- The helmet being worn
 
- 
setHelmetSets the helmet worn by the entity- Parameters:
- helmet- The helmet to put on the entity
 
- 
setHelmetSets the helmet worn by the entity- Parameters:
- helmet- The helmet to put on the entity
- silent- whether or not the equip sound should be silenced
 
- 
getChestplateGets a copy of the chest plate currently being worn by the entity- Returns:
- The chest plate being worn
 
- 
setChestplateSets the chest plate worn by the entity- Parameters:
- chestplate- The chest plate to put on the entity
 
- 
setChestplateSets the chest plate worn by the entity- Parameters:
- chestplate- The chest plate to put on the entity
- silent- whether or not the equip sound should be silenced
 
- 
getLeggingsGets a copy of the leggings currently being worn by the entity- Returns:
- The leggings being worn
 
- 
setLeggingsSets the leggings worn by the entity- Parameters:
- leggings- The leggings to put on the entity
 
- 
setLeggingsSets the leggings worn by the entity- Parameters:
- leggings- The leggings to put on the entity
- silent- whether or not the equip sound should be silenced
 
- 
getBootsGets a copy of the boots currently being worn by the entity- Returns:
- The boots being worn
 
- 
setBootsSets the boots worn by the entity- Parameters:
- boots- The boots to put on the entity
 
- 
setBootsSets the boots worn by the entity- Parameters:
- boots- The boots to put on the entity
- silent- whether or not the equip sound should be silenced
 
- 
getArmorContentsGets all ItemStacks from the armor slots.- Returns:
- all the ItemStacks from the armor slots. Individual items can be null and are returned in a fixed order starting from the boots and going up to the helmet
 
- 
setArmorContentsSets the entities armor to the provided array of ItemStacks- Parameters:
- items- The items to set the armor as. Individual items may be null.
 
- 
clearvoid clear()Clears the entity of all armor and held items
- 
getItemInHandDropChanceDeprecated.entities can duel wield now use the methods for the specific hand instead- Returns:
- drop chance
- See Also:
 
- 
setItemInHandDropChanceDeprecated.entities can duel wield now use the methods for the specific hand instead- Parameters:
- chance- drop chance
- See Also:
 
- 
getItemInMainHandDropChancefloat getItemInMainHandDropChance()Gets the chance of the main hand item being dropped upon this creature's death.- A drop chance of 0.0F will never drop
- A drop chance of 1.0F will always drop
 - Returns:
- chance of the currently held item being dropped (1 for non-Mob)
 
- 
setItemInMainHandDropChancevoid setItemInMainHandDropChance(float chance) Sets the chance of the item this creature is currently holding in their main hand being dropped upon this creature's death.- A drop chance of 0.0F will never drop
- A drop chance of 1.0F will always drop
 - Parameters:
- chance- the chance of the main hand item being dropped
- Throws:
- UnsupportedOperationException- when called on non-- Mob
 
- 
getItemInOffHandDropChancefloat getItemInOffHandDropChance()Gets the chance of the off hand item being dropped upon this creature's death.- A drop chance of 0.0F will never drop
- A drop chance of 1.0F will always drop
 - Returns:
- chance of the off hand item being dropped (1 for non-Mob)
 
- 
setItemInOffHandDropChancevoid setItemInOffHandDropChance(float chance) Sets the chance of the off hand item being dropped upon this creature's death.- A drop chance of 0.0F will never drop
- A drop chance of 1.0F will always drop
 - Parameters:
- chance- the chance of off hand item being dropped
- Throws:
- UnsupportedOperationException- when called on non-- Mob
 
- 
getHelmetDropChancefloat getHelmetDropChance()Gets the chance of the helmet being dropped upon this creature's death.- A drop chance of 0.0F will never drop
- A drop chance of 1.0F will always drop
 - Returns:
- the chance of the helmet being dropped (1 for non-Mob)
 
- 
setHelmetDropChancevoid setHelmetDropChance(float chance) Sets the chance of the helmet being dropped upon this creature's death.- A drop chance of 0.0F will never drop
- A drop chance of 1.0F will always drop
 - Parameters:
- chance- of the helmet being dropped
- Throws:
- UnsupportedOperationException- when called on non-- Mob
 
- 
getChestplateDropChancefloat getChestplateDropChance()Gets the chance of the chest plate being dropped upon this creature's death.- A drop chance of 0.0F will never drop
- A drop chance of 1.0F will always drop
 - Returns:
- the chance of the chest plate being dropped (1 for non-Mob)
 
- 
setChestplateDropChancevoid setChestplateDropChance(float chance) Sets the chance of the chest plate being dropped upon this creature's death.- A drop chance of 0.0F will never drop
- A drop chance of 1.0F will always drop
 - Parameters:
- chance- of the chest plate being dropped
- Throws:
- UnsupportedOperationException- when called on non-- Mob
 
- 
getLeggingsDropChancefloat getLeggingsDropChance()Gets the chance of the leggings being dropped upon this creature's death.- A drop chance of 0.0F will never drop
- A drop chance of 1.0F will always drop
 - Returns:
- the chance of the leggings being dropped (1 for non-Mob)
 
- 
setLeggingsDropChancevoid setLeggingsDropChance(float chance) Sets the chance of the leggings being dropped upon this creature's death.- A drop chance of 0.0F will never drop
- A drop chance of 1.0F will always drop
 - Parameters:
- chance- chance of the leggings being dropped
- Throws:
- UnsupportedOperationException- when called on non-- Mob
 
- 
getBootsDropChancefloat getBootsDropChance()Gets the chance of the boots being dropped upon this creature's death.- A drop chance of 0.0F will never drop
- A drop chance of 1.0F will always drop
 - Returns:
- the chance of the boots being dropped (1 for non-Mob)
 
- 
setBootsDropChancevoid setBootsDropChance(float chance) Sets the chance of the boots being dropped upon this creature's death.- A drop chance of 0.0F will never drop
- A drop chance of 1.0F will always drop
 - Parameters:
- chance- of the boots being dropped
- Throws:
- UnsupportedOperationException- when called on non-- Mob
 
- 
getHolderGet the entity this EntityEquipment belongs to- Returns:
- the entity this EntityEquipment belongs to
 
 
-