func (a *Armour) SetLeggings(leggings item.Stack) {
	_ = a.inv.SetItem(2, leggings)
}
SetLeggings sets the item stack passed as the leggings in the inventory.
package inventory
import (
	"fmt"
	"github.com/df-mc/dragonfly/server/item"
	"github.com/df-mc/dragonfly/server/item/armour"
)
type Armour struct {
	inv *Inventory
}
func NewArmour(f func(slot int, item item.Stack)) *Armour {
	inv := New(4, f)
	inv.canAdd = canAddArmour
	return &Armour{inv: inv}
}
func canAddArmour(s item.Stack, slot int) bool {
	if s.Empty() {
		return true
	}
	switch slot {
	case 0:
		if h, ok := s.Item().(armour.Helmet); ok {
			return h.Helmet()
		}
	case 1:
		if c, ok := s.Item().(armour.Chestplate); ok {
			return c.Chestplate()
		}
	case 2:
		if l, ok := s.Item().(armour.Leggings); ok {
			return l.Leggings()
		}
	case 3:
		if b, ok := s.Item().(armour.Boots); ok {
			return b.Boots()
		}
	}
	return false
}
func (a *Armour) SetHelmet(helmet item.Stack) {
	_ = a.inv.SetItem(0, helmet)
}
func (a *Armour) Helmet() item.Stack {
	i, _ := a.inv.Item(0)
	return i
}
func (a *Armour) SetChestplate(chestplate item.Stack) {
	_ = a.inv.SetItem(1, chestplate)
}
func (a *Armour) Chestplate() item.Stack {
	i, _ := a.inv.Item(1)
	return i
}