Interface Equipable

    • Method Detail

      • equipment

        EquipmentInventory equipment()
        Returns the EquipmentInventory this is holding.
        Returns:
        The EquipmentInventory this is holding
      • canEquip

        default boolean canEquip​(java.util.function.Supplier<? extends EquipmentType> type)
      • canEquip

        default boolean canEquip​(java.util.function.Supplier<? extends EquipmentType> type,
                                 ItemStack equipment)
      • equipped

        java.util.Optional<ItemStack> equipped​(EquipmentType type)
        Gets the item currently equipped by this Equipable in the specified slot.
        Parameters:
        type - The type of equipment slot to query
        Returns:
        The item in the equipped slot, if available
      • equipped

        default java.util.Optional<ItemStack> equipped​(java.util.function.Supplier<? extends EquipmentType> type)
      • equip

        boolean equip​(EquipmentType type,
                      ItemStack equipment)
        Sets the item currently equipped by the Equipable in the specified slot, if the equipable has such a slot.
        Parameters:
        type - The type of equipment slot to set
        equipment - The equipment to set the any equipped item
        Returns:
        true if the item was successfully equipped, false if the item could not be equipped because the equipable doesn't support the specified equipment type or because the item was incompatible with the specified slot.
      • equip

        default boolean equip​(java.util.function.Supplier<? extends EquipmentType> type,
                              ItemStack equipment)