public boolean containsAtLeast(Inventory inventory, int minimumAmount) {

        int foundItems = 0;

        if (inventory instanceof PlayerInventory) {
            PlayerInventory playerInventory = (PlayerInventory) inventory;
            if (equals(playerInventory.getBoots()) || equals(playerInventory.getLeggings()) || equals(playerInventory.getChestplate()) || equals(playerInventory.getHelmet())) {
                foundItems++;
            }
        }

        for (ItemStack itemStack : inventory.getContents()) {
            if (equals(itemStack)) {
                foundItems++;
            }
        }

        return foundItems >= minimumAmount;
    }