diff options
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt | 6 |
1 files changed, 5 insertions, 1 deletions
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 |