@Subscribe
	public void onScriptCallbackEvent(ScriptCallbackEvent event)
	{
		String eventName = event.getEventName();

		int[] intStack = client.getIntStack();
		String[] stringStack = client.getStringStack();
		int intStackSize = client.getIntStackSize();
		int stringStackSize = client.getStringStackSize();

		switch (eventName)
		{
			case "setSearchBankInputText":
				stringStack[stringStackSize - 1] = SEARCH_BANK_INPUT_TEXT;
				break;
			case "setSearchBankInputTextFound":
			{
				int matches = intStack[intStackSize - 1];
				stringStack[stringStackSize - 1] = String.format(SEARCH_BANK_INPUT_TEXT_FOUND, matches);
				break;
			}
			case "bankSearchFilter":
				final int itemId = intStack[intStackSize - 1];
				String searchfilter = stringStack[stringStackSize - 1];

				BankTag tag = activeTag;
				boolean tagSearch = true;
				// Shared storage uses ~bankmain_filteritem too. Allow using tag searches in it but don't
				// apply the tag search from the active tab.
				final boolean bankOpen = client.getItemContainer(InventoryID.BANK) != null;
				if (tag == null || !bankOpen)
				{
					if (searchfilter.isEmpty())
					{
						return;
					}

					tagSearch = searchfilter.startsWith(TAG_SEARCH);
					if (tagSearch)
					{
						searchfilter = searchfilter.substring(TAG_SEARCH.length()).trim();
					}

					// Build a temporary BankTag using the search filter
					tag = buildSearchFilterBankTag(searchfilter);
				}

				if (itemId == -1 && tag.layout() != null)
				{
					// item -1 always passes on a laid out tab so items can be dragged to it
					return;
				}

				if (itemId > -1 && tag.contains(itemId))
				{
					// return true
					intStack[intStackSize - 2] = 1;
				}
				else if (tagSearch)
				{
					// if the item isn't tagged we return false to prevent the item matching if the item name happens
					// to contain the tag name.
					intStack[intStackSize - 2] = 0;
				}
				break;
			case "getSearchingTagTab":
				intStack[intStackSize - 1] = activeTag != null ? 1 : 0;
				break;
			case "bankBuildTab":
				// Use the per-tab view when we want to hide the separators to avoid having to reposition items &
				// recomputing the scroll height.
				if (activeTag != null && (tabInterface.isTagTabActive() || config.removeSeparators() || activeTag.layout() != null))
				{
					var stack = client.getIntStack();
					var sz = client.getIntStackSize();
					stack[sz - 1] = 1; // use single tab view mode
				}
				break;
		}
	}
@Test
	public void testNonExplicitSearch()
	{
		when(client.getIntStack()).thenReturn(new int[]{0, ABYSSAL_WHIP});
		when(client.getStringStack()).thenReturn(new String[]{"whip"});

		when(configManager.getConfiguration(BankTagsPlugin.CONFIG_GROUP,
			TagManager.ITEM_KEY_PREFIX + ABYSSAL_WHIP)).thenReturn("herb,bossing,whip long tag");

		bankTagsPlugin.onScriptCallbackEvent(EVENT);
		assertEquals(1, client.getIntStack()[0]);
	}