aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorLorenz <ESs95s3P5z8Pheb>2022-07-15 20:51:45 +0200
committerLorenz <ESs95s3P5z8Pheb>2022-07-15 20:51:45 +0200
commitd036524d3a6182b844245efdf3d5f8b2882f1e31 (patch)
treea345801327c2f8a86b01861336084eaa4649942d /src/main/java/at
parent1511531973e8654b8b1fc0cea20a14c857d21ebf (diff)
downloadskyhanni-d036524d3a6182b844245efdf3d5f8b2882f1e31.tar.gz
skyhanni-d036524d3a6182b844245efdf3d5f8b2882f1e31.tar.bz2
skyhanni-d036524d3a6182b844245efdf3d5f8b2882f1e31.zip
added trade npc list
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/items/HideNotClickableItems.kt6
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