@EventHandler(priority = EventPriority.NORMAL)
    public void onInventoryMoveItem (InventoryMoveItemEvent event)
      {
        if ( ! (event.getInitiator() instanceof PlayerInventory)
            || ! (event.getDestination() instanceof BrewerInventory))
          return;
        if (event.getItem().getType() != Material.QUARTZ)
          return;
        event.setCancelled(true);
        int amount = event.getItem().getAmount();
        ItemStack[] inv = event.getInitiator().getContents();
        for (int i = 0; i < inv.length; i++)
          {
            ItemStack item = inv[i];
            if (item.getType() != Material.QUARTZ)
              continue;
            if (item.getAmount() == amount)
              {
                inv[i] = null;
              }
            else
              {
                item.setAmount(item.getAmount() - amount);
              }
          }
        event.getInitiator().setContents(inv);
        event.getDestination().setItem(3,
            new ItemStack(Material.QUARTZ, amount));
      }