@Subscribe
	public void onItemContainerChanged(final ItemContainerChanged event)
	{
		final ItemContainer itemContainer = event.getItemContainer();
		if (event.getContainerId() == InventoryID.EQUIPMENT.getId())
		{
			equippedItems = itemContainer.getItems();
			return;
		}

		if (event.getContainerId() != InventoryID.INVENTORY.getId())
		{
			return;
		}

		inventoryItems = itemContainer.getItems();

		// Add runes from rune pouch to inventoryItems
		if (itemContainer.contains(ItemID.RUNE_POUCH) || itemContainer.contains(ItemID.RUNE_POUCH_L)
			|| itemContainer.contains(ItemID.DIVINE_RUNE_POUCH) || itemContainer.contains(ItemID.DIVINE_RUNE_POUCH_L))
		{
			List<Item> runePouchContents = getRunepouchContents();

			if (!runePouchContents.isEmpty())
			{
				for (int i = 0; i < inventoryItems.length; i++)
				{
					Item invItem = inventoryItems[i];
					for (Item rune : runePouchContents)
					{
						if (invItem.getId() == rune.getId())
						{
							inventoryItems[i] = new Item(invItem.getId(), rune.getQuantity() + invItem.getQuantity());
							runePouchContents.remove(rune);
							break;
						}
					}
				}

				inventoryItems = ArrayUtils.addAll(inventoryItems, runePouchContents.toArray(new Item[0]));
			}
		}

		// Check if item was removed from inventory
		if (clue != null && clueItemId != null)
		{
			// Check if clue was removed from inventory
			if (!itemContainer.contains(clueItemId))
			{
				resetClue(true);
			}
		}

		// if three step clue check for clue scroll pieces
		if (clue instanceof ThreeStepCrypticClue)
		{
			if (((ThreeStepCrypticClue) clue).update(event.getContainerId(), itemContainer))
			{
				worldMapPointsSet = false;
				npcsToMark.clear();

				if (config.displayHintArrows())
				{
					client.clearHintArrow();
				}

				checkClueNPCs(clue, client.getCachedNPCs());
			}
		}
	}
@Test
	public void testThatRunepouchIsAddedToInventory()
	{
		ItemContainer container = mock(ItemContainer.class);
		ItemContainerChanged event = new ItemContainerChanged(InventoryID.INVENTORY.getId(), container);

		final Item[] inventory = {
			new Item(ItemID.COINS_995, 100),
			new Item(ItemID.MITHRIL_BAR, 1),
			new Item(ItemID.MITHRIL_BAR, 1),
			new Item(ItemID.MITHRIL_BAR, 1),
			new Item(ItemID.SOUL_RUNE, 30),
			new Item(ItemID.COSMIC_RUNE, 100),
			new Item(ItemID.RUNE_POUCH, 1),
			new Item(ItemID.SPADE, 1),
			new Item(ItemID.CLUE_SCROLL_MASTER, 1)
		};

		when(container.getItems()).thenReturn(inventory);
		when(container.contains(ItemID.RUNE_POUCH)).thenReturn(true);

		when(client.getVarbitValue(Varbits.RUNE_POUCH_RUNE1)).thenReturn(9); // Cosmic Rune
		when(client.getVarbitValue(Varbits.RUNE_POUCH_AMOUNT1)).thenReturn(20);
		when(client.getVarbitValue(Varbits.RUNE_POUCH_RUNE3)).thenReturn(4); // Fire Rune
		when(client.getVarbitValue(Varbits.RUNE_POUCH_AMOUNT3)).thenReturn(4000);

		EnumComposition enumComposition = mock(EnumComposition.class);
		when(enumComposition.getIntValue(9)).thenReturn(ItemID.COSMIC_RUNE);
		when(enumComposition.getIntValue(4)).thenReturn(ItemID.FIRE_RUNE);
		when(client.getEnum(EnumID.RUNEPOUCH_RUNE)).thenReturn(enumComposition);

		plugin.onItemContainerChanged(event);

		assertFalse(Arrays.equals(inventory, plugin.getInventoryItems()));

		List<Item> inventoryList = Arrays.asList(plugin.getInventoryItems());

		assertThat(inventoryList, hasItem(new Item(ItemID.COSMIC_RUNE, 120)));
		assertThat(inventoryList, hasItem(new Item(ItemID.FIRE_RUNE, 4000)));
	}