Interface EquipmentHandler
- All Known Implementing Classes:
EntityCreature, LivingEntity, Player
-
Method Summary
Modifier and TypeMethodDescriptiondefault ItemStackGets the body equipment.default ItemStackgetBoots()Gets the boots.default ItemStackGets the chestplate.getEquipment(EquipmentSlot slot) Gets the equipment in a specific slot.default EntityEquipmentPacketGets the packet with all the equipments.default ItemStackGets the helmet.default ItemStackgetItemInHand(PlayerHand hand) Gets theItemStackin the specific hand.default ItemStackGets theItemStackin main hand.default ItemStackGets theItemStackin off hand.default ItemStackGets the leggings.default booleanhasEquipment(EquipmentSlot slot) default voidsetBodyEquipment(ItemStack itemStack) Changes the body equipment.default voidChanges the boots.default voidsetChestplate(ItemStack itemStack) Changes the chestplate.voidsetEquipment(EquipmentSlot slot, ItemStack itemStack) default voidChanges the helmet.default voidsetItemInHand(PlayerHand hand, ItemStack stack) Changes theItemStackin the specific hand.default voidsetItemInMainHand(ItemStack itemStack) Changes the main handItemStack.default voidsetItemInOffHand(ItemStack itemStack) Changes the off handItemStack.default voidsetLeggings(ItemStack itemStack) Changes the leggings.default voidsyncEquipment(EquipmentSlot slot) Sends a specific equipment to viewers.default voidsyncEquipment(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
-
setItemInMainHand
-
getItemInOffHand
-
setItemInOffHand
-
getItemInHand
Gets theItemStackin the specific hand. -
setItemInHand
-
getHelmet
-
setHelmet
-
getChestplate
-
setChestplate
Changes the chestplate.- Parameters:
itemStack- the chestplate
-
getLeggings
-
setLeggings
Changes the leggings.- Parameters:
itemStack- the leggings
-
getBoots
-
setBoots
-
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
-