Interface EquipmentHandler

All Known Implementing Classes:
EntityCreature, LivingEntity, Player

public interface EquipmentHandler
Represents an Entity which can have ItemStack in hands and armor slots.
  • Method Details Link icon

    • getEquipment Link icon

      @NotNull @NotNull ItemStack getEquipment(@NotNull @NotNull EquipmentSlot slot)
      Gets the equipment in a specific slot.
      Parameters:
      slot - the equipment to get the item from
      Returns:
      the equipment ItemStack
    • setEquipment Link icon

      void setEquipment(@NotNull @NotNull EquipmentSlot slot, @NotNull @NotNull ItemStack itemStack)
    • getItemInMainHand Link icon

      @NotNull default @NotNull ItemStack getItemInMainHand()
      Gets the ItemStack in main hand.
      Returns:
      the ItemStack in main hand
    • setItemInMainHand Link icon

      default void setItemInMainHand(@NotNull @NotNull ItemStack itemStack)
      Changes the main hand ItemStack.
      Parameters:
      itemStack - the main hand ItemStack
    • getItemInOffHand Link icon

      @NotNull default @NotNull ItemStack getItemInOffHand()
      Gets the ItemStack in off hand.
      Returns:
      the item in off hand
    • setItemInOffHand Link icon

      default void setItemInOffHand(@NotNull @NotNull ItemStack itemStack)
      Changes the off hand ItemStack.
      Parameters:
      itemStack - the off hand ItemStack
    • getItemInHand Link icon

      @NotNull default @NotNull ItemStack getItemInHand(@NotNull @NotNull PlayerHand hand)
      Gets the ItemStack in the specific hand.
      Parameters:
      hand - the Hand to get the ItemStack from
      Returns:
      the ItemStack in hand
    • setItemInHand Link icon

      default void setItemInHand(@NotNull @NotNull PlayerHand hand, @NotNull @NotNull ItemStack stack)
      Changes the ItemStack in the specific hand.
      Parameters:
      hand - the hand to set the item to
      stack - the ItemStack to set
    • getHelmet Link icon

      @NotNull default @NotNull ItemStack getHelmet()
      Gets the helmet.
      Returns:
      the helmet
    • setHelmet Link icon

      default void setHelmet(@NotNull @NotNull ItemStack itemStack)
      Changes the helmet.
      Parameters:
      itemStack - the helmet
    • getChestplate Link icon

      @NotNull default @NotNull ItemStack getChestplate()
      Gets the chestplate.
      Returns:
      the chestplate
    • setChestplate Link icon

      default void setChestplate(@NotNull @NotNull ItemStack itemStack)
      Changes the chestplate.
      Parameters:
      itemStack - the chestplate
    • getLeggings Link icon

      @NotNull default @NotNull ItemStack getLeggings()
      Gets the leggings.
      Returns:
      the leggings
    • setLeggings Link icon

      default void setLeggings(@NotNull @NotNull ItemStack itemStack)
      Changes the leggings.
      Parameters:
      itemStack - the leggings
    • getBoots Link icon

      @NotNull default @NotNull ItemStack getBoots()
      Gets the boots.
      Returns:
      the boots
    • setBoots Link icon

      default void setBoots(@NotNull @NotNull ItemStack itemStack)
      Changes the boots.
      Parameters:
      itemStack - the boots
    • getBodyEquipment Link icon

      @NotNull default @NotNull ItemStack getBodyEquipment()
      Gets the body equipment. Used by horses, wolves, and llama's.
      Returns:
      the body equipment
    • setBodyEquipment Link icon

      default void setBodyEquipment(@NotNull @NotNull ItemStack itemStack)
      Changes the body equipment. Used by horses, wolves, and llama's.
      Parameters:
      itemStack - the body equipment
    • hasEquipment Link icon

      default boolean hasEquipment(@NotNull @NotNull EquipmentSlot slot)
    • syncEquipment Link icon

      default void syncEquipment(@NotNull @NotNull EquipmentSlot slot)
      Sends a specific equipment to viewers.
      Parameters:
      slot - the slot of the equipment
    • syncEquipment Link icon

      default void syncEquipment(@NotNull @NotNull EquipmentSlot slot, @NotNull @NotNull ItemStack stack)
    • getEquipmentsPacket Link icon

      @NotNull default @NotNull EntityEquipmentPacket getEquipmentsPacket()
      Gets the packet with all the equipments.
      Returns:
      the packet with the equipments
      Throws:
      IllegalStateException - if 'this' is not an Entity