Beispiel #1
0
    public void setItem(Item item, int quantity)
    {
        ItemStack occurrence = findFirst(item);

        if (occurrence == null)
        {
            return;
        }
        if (quantity == 0)
        {
            occurrence.Clear();
        }
        else
        {
            occurrence.quantity = quantity;
        }
    }