@EventHandler(priority=EventPriority.NORMAL)
	public void pickup(PlayerPickupItemEvent event) {
		ItemStack item = event.getItem().getItemStack();
		item.setAmount(item.getAmount() - event.getRemaining());
		Inventory inv = event.getPlayer().getInventory();
		int quantity = BlockAPI.getCustomBlockAmount(item) * item.getAmount();
		CustomBlock cblock = this.plugin.getCustomBlock(item);
		if ((quantity == -1) || (cblock == null))
			return;
		for (int x = 0; x < inv.getSize(); x++) {
			ItemStack itemX = inv.getItem(x);
			if (itemX != null)
			{
				int amount = BlockAPI.getCustomBlockAmount(itemX);
				if ((amount != -1) && (amount < cblock.getMaxStackSize()) && (cblock.getIdentifier().equalsIgnoreCase(this.plugin.getCustomBlock(itemX).getIdentifier())))
				{
					int test = amount + quantity;
					if (test <= cblock.getMaxStackSize()) {
						quantity = 0;
						inv.setItem(x, BlockAPI.setCustomBlockAmount(itemX, test));
						break;
					}
					quantity = test - cblock.getMaxStackSize();
					inv.setItem(x, BlockAPI.setCustomBlockAmount(itemX, cblock.getMaxStackSize()));
				}
			}
		}
		if (quantity > 0) {
			item = BlockAPI.setCustomBlockAmount(item, quantity);
			item.setAmount(1);
			event.getPlayer().getInventory().addItem(new ItemStack[] { item });
		}
		event.getItem().remove();
		event.setCancelled(true);
	}