Interface EntityEquipment
- All Known Subinterfaces:
Inventory
public interface EntityEquipment
Represents the equipment of an entity.
-
Method Summary
Modifier and TypeMethodDescriptionasMap()Gets the equipment as a map.default @NotNull ItemStackboots()default voiddefault @NotNull ItemStackdefault voidchestplate(@NotNull ItemStack item) @NotNull ItemStackget(@NotNull EquipmentSlot slot) Gets the equipment at the specified equipment slot.default @NotNull ItemStackhelmet()default voiddefault @NotNull ItemStackdefault voiditemInMainHand(@NotNull ItemStack item) default @NotNull ItemStackdefault voiditemInOffHand(@NotNull ItemStack item) default @NotNull ItemStackleggings()default void@NotNull ItemStackset(@NotNull EquipmentSlot slot, @NotNull ItemStack equipment) Sets the equipment at the specified equipment slot.
-
Method Details
-
get
Gets the equipment at the specified equipment slot.- Parameters:
slot- the slot- Returns:
- the item at the specified equipment slot
- Since:
- 1.0.0
-
set
@NotNull @NotNull ItemStack set(@NotNull @NotNull EquipmentSlot slot, @NotNull @NotNull ItemStack equipment) Sets the equipment at the specified equipment slot.- Parameters:
slot- the slotequipment- the item to set- Returns:
- the previous item
- Since:
- 1.0.0
-
itemInMainHand
- Since:
- 1.0.0
-
itemInMainHand
- Since:
- 1.0.0
-
itemInOffHand
- Since:
- 1.0.0
-
itemInOffHand
- Since:
- 1.0.0
-
helmet
- Since:
- 1.0.0
-
helmet
- Since:
- 1.0.0
-
chestplate
- Since:
- 1.0.0
-
chestplate
- Since:
- 1.0.0
-
leggings
- Since:
- 1.0.0
-
leggings
- Since:
- 1.0.0
-
boots
- Since:
- 1.0.0
-
boots
- Since:
- 1.0.0
-
asMap
Map<EquipmentSlot,ItemStack> asMap()Gets the equipment as a map.- Returns:
- a map that contains the equipment, empty stacks are not stored
-