Function getEquipmentItem

  • Get a slot's item.

    Parameters

    • entity: Entity

      The owner of the slot.

    • slot: EquipmentSlot = EquipmentSlot.Mainhand

      The slot to get item stack.

    Returns ItemStack | undefined

    Item of the slot, default is EquipmentSlot.Mainhand.