public interface ArmorEquipable extends Equipable
Represents an entity that can be equipped with armor and a held item. Each
method here is a shorthand for the appropriate Equipable.getEquipped(org.spongepowered.api.item.inventory.equipment.EquipmentType)
or
Equipable.equip(org.spongepowered.api.item.inventory.equipment.EquipmentType, org.spongepowered.api.item.inventory.ItemStack)
method call.
Classes implementing this interface should provide all of the
supplied equipment slot types. Classes which do not support all slot types in
this interface should instead implement Equipable
.
Modifier and Type | Method and Description |
---|---|
default Optional<ItemStack> |
getBoots()
Gets the boots currently being worn by this entity.
|
default Optional<ItemStack> |
getChestplate()
Gets the chestplate currently being worn by this entity.
|
default Optional<ItemStack> |
getHelmet()
Gets the helmet currently being worn by this entity.
|
Optional<ItemStack> |
getItemInHand(HandType handType)
Gets the current equipped item in hand if available.
|
default Optional<ItemStack> |
getLeggings()
Gets the leggings currently being worn by this entity.
|
default void |
setBoots(ItemStack boots)
Sets the boots currently being worn by this entity.
|
default void |
setChestplate(ItemStack chestplate)
Sets the chestplate currently being worn by this entity.
|
default void |
setHelmet(ItemStack helmet)
Sets the helmet currently being worn by this entity.
|
void |
setItemInHand(HandType hand,
ItemStack itemInHand)
Sets the item in hand for this entity.
|
default void |
setLeggings(ItemStack leggings)
Sets the leggings currently being worn by this entity.
|
canEquip, canEquip, equip, getEquipped
getUniqueId
getInventory
default Optional<ItemStack> getHelmet()
Having the helmet as null will result in having nothing equipped in the helmet slot.
default void setHelmet(@Nullable ItemStack helmet)
Having the helmet as null will result in having nothing equipped in the helmet slot.
helmet
- The helmet to put on the entitydefault Optional<ItemStack> getChestplate()
Having the chestplate as null will result in having nothing equipped in the chestplate slot.
default void setChestplate(@Nullable ItemStack chestplate)
Having the chestplate as null will result in having nothing equipped in the chestplate slot.
chestplate
- The chestplate to put on the entitydefault Optional<ItemStack> getLeggings()
Having the leggings as null will result in having nothing equipped in the leggings slot.
default void setLeggings(@Nullable ItemStack leggings)
Having the leggings as null will result in having nothing equipped in the leggings slot.
leggings
- The leggings to put on the entitydefault Optional<ItemStack> getBoots()
Having the boots as null will result in having nothing equipped in the boots slot.
default void setBoots(@Nullable ItemStack boots)
Having the boots as null will result in having nothing equipped in the boots slot.
boots
- The boots to put on the entityOptional<ItemStack> getItemInHand(HandType handType)
Having the item in hand as null will result in having nothing equipped in the item in hand slot.
handType
- The hand type to retrieve from