From d036524d3a6182b844245efdf3d5f8b2882f1e31 Mon Sep 17 00:00:00 2001 From: Lorenz Date: Fri, 15 Jul 2022 20:51:45 +0200 Subject: added trade npc list --- src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2/skyhanni') diff --git a/src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt b/src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt index 9827d3aab..95759a981 100644 --- a/src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt +++ b/src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt @@ -31,6 +31,7 @@ class HideNotClickableItems { private val hideNpcSellList = MultiFilter() private val hideInStorageList = MultiFilter() + private val tradeNpcList = MultiFilter() @SubscribeEvent fun onRepoReload(event: RepositoryReloadEvent) { @@ -38,6 +39,9 @@ class HideNotClickableItems { val hideNotClickableItems = event.getConstant("HideNotClickableItems")!! hideNpcSellList.load(hideNotClickableItems["hide_npc_sell"].asJsonObject) hideInStorageList.load(hideNotClickableItems["hide_in_storage"].asJsonObject) + + val tradeNpcs = event.getConstant("TradeNpcs")!! + tradeNpcList.load(tradeNpcs) } catch (e: Exception) { e.printStackTrace() LorenzUtils.error("error in RepositoryReloadEvent") @@ -251,7 +255,7 @@ class HideNotClickableItems { } private fun hideNpcSell(chestName: String, stack: ItemStack): Boolean { - if (chestName != "Trades" && chestName != "Ophelia") return false + if (!tradeNpcList.match(chestName)) return false var name = stack.cleanName() val size = stack.stackSize -- cgit