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 ItemStack
boots()
default void
default @NotNull ItemStack
default void
chestplate
(@NotNull ItemStack item) @NotNull ItemStack
get
(@NotNull EquipmentSlot slot) Gets the equipment at the specified equipment slot.default @NotNull ItemStack
helmet()
default void
default @NotNull ItemStack
default void
itemInMainHand
(@NotNull ItemStack item) default @NotNull ItemStack
default void
itemInOffHand
(@NotNull ItemStack item) default @NotNull ItemStack
leggings()
default void
@NotNull ItemStack
set
(@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
-