- All Known Implementing Classes:
EntityCreature
,LivingEntity
,Player
public interface EquipmentHandler
-
Method Summary
Modifier and TypeMethodDescriptiondefault ItemStack
Gets the body equipment.default ItemStack
getBoots()
Gets the boots.default ItemStack
Gets the chestplate.getEquipment
(EquipmentSlot slot) Gets the equipment in a specific slot.default EntityEquipmentPacket
Gets the packet with all the equipments.default ItemStack
Gets the helmet.default ItemStack
getItemInHand
(PlayerHand hand) Gets theItemStack
in the specific hand.default ItemStack
Gets theItemStack
in main hand.default ItemStack
Gets theItemStack
in off hand.default ItemStack
Gets the leggings.default boolean
hasEquipment
(EquipmentSlot slot) default void
setBodyEquipment
(ItemStack itemStack) Changes the body equipment.default void
Changes the boots.default void
setChestplate
(ItemStack itemStack) Changes the chestplate.void
setEquipment
(EquipmentSlot slot, ItemStack itemStack) default void
Changes the helmet.default void
setItemInHand
(PlayerHand hand, ItemStack stack) Changes theItemStack
in the specific hand.default void
setItemInMainHand
(ItemStack itemStack) Changes the main handItemStack
.default void
setItemInOffHand
(ItemStack itemStack) Changes the off handItemStack
.default void
setLeggings
(ItemStack itemStack) Changes the leggings.default void
syncEquipment
(EquipmentSlot slot) Sends a specific equipment to viewers.default void
syncEquipment
(EquipmentSlot slot, ItemStack stack)
-
Method Details
-
getEquipment
Gets the equipment in a specific slot.- Parameters:
slot
- the equipment to get the item from- Returns:
- the equipment
ItemStack
-
setEquipment
-
getItemInMainHand
Gets theItemStack
in main hand.- Returns:
- the
ItemStack
in main hand
-
setItemInMainHand
Changes the main handItemStack
.- Parameters:
itemStack
- the main handItemStack
-
getItemInOffHand
Gets theItemStack
in off hand.- Returns:
- the item in off hand
-
setItemInOffHand
Changes the off handItemStack
.- Parameters:
itemStack
- the off handItemStack
-
getItemInHand
Gets theItemStack
in the specific hand. -
setItemInHand
Changes theItemStack
in the specific hand.- Parameters:
hand
- the hand to set the item tostack
- theItemStack
to set
-
getHelmet
Gets the helmet.- Returns:
- the helmet
-
setHelmet
Changes the helmet.- Parameters:
itemStack
- the helmet
-
getChestplate
Gets the chestplate.- Returns:
- the chestplate
-
setChestplate
Changes the chestplate.- Parameters:
itemStack
- the chestplate
-
getLeggings
Gets the leggings.- Returns:
- the leggings
-
setLeggings
Changes the leggings.- Parameters:
itemStack
- the leggings
-
getBoots
Gets the boots.- Returns:
- the boots
-
setBoots
Changes the boots.- Parameters:
itemStack
- the boots
-
getBodyEquipment
Gets the body equipment. Used by horses, wolves, and llama's.- Returns:
- the body equipment
-
setBodyEquipment
Changes the body equipment. Used by horses, wolves, and llama's.- Parameters:
itemStack
- the body equipment
-
hasEquipment
-
syncEquipment
Sends a specific equipment to viewers.- Parameters:
slot
- the slot of the equipment
-
syncEquipment
-
getEquipmentsPacket
Gets the packet with all the equipments.- Returns:
- the packet with the equipments
- Throws:
IllegalStateException
- if 'this' is not anEntity
-