aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-15 10:23:05 +0100
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-11-15 10:23:05 +0100
commitef61176292763768d1f7e12e5113d7a2f76d0c9c (patch)
treed4334e942889b8c495c567219a98d4060bd789f5 /src/main/java/at/hannibal2/skyhanni
parent791905a8ac2e3aee650ba8d04fc8a853ab8fcdca (diff)
downloadskyhanni-ef61176292763768d1f7e12e5113d7a2f76d0c9c.tar.gz
skyhanni-ef61176292763768d1f7e12e5113d7a2f76d0c9c.tar.bz2
skyhanni-ef61176292763768d1f7e12e5113d7a2f76d0c9c.zip
more exact checks for fandom wiki click check: fixed blocking clicks on bazaar with player name "wiki"
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/FandomWikiFromMenus.kt5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/FandomWikiFromMenus.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/FandomWikiFromMenus.kt
index 44d4b94ed..eb658b865 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/FandomWikiFromMenus.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/FandomWikiFromMenus.kt
@@ -8,7 +8,6 @@ import at.hannibal2.skyhanni.utils.ItemUtils.getInternalName
import at.hannibal2.skyhanni.utils.ItemUtils.getLore
import at.hannibal2.skyhanni.utils.ItemUtils.nameWithEnchantment
import at.hannibal2.skyhanni.utils.LorenzUtils
-import at.hannibal2.skyhanni.utils.LorenzUtils.anyContains
import at.hannibal2.skyhanni.utils.OSUtils
import at.hannibal2.skyhanni.utils.StringUtils.removeColor
import io.github.moulberry.notenoughupdates.events.SlotClickEvent
@@ -56,8 +55,8 @@ class FandomWikiFromMenus {
} else {
//.lowercase() to match "Wiki!" and ".*wiki.*" lore lines in one fell swoop
val inThirdWikiInventory = // TODO better name for this inventory
- (itemClickedStack.getLore().anyContains("Wiki") || itemClickedStack.getLore().anyContains("wiki"))
- && !itemClickedStack.getLore().anyContains("wikipedia")
+ (itemClickedStack.getLore()
+ .let { it.any { line -> line == "§7§eClick to view on the SkyBlock" } && it.last() == "§eWiki!" })
if (inThirdWikiInventory) {
wikiDisplayName = itemClickedName.removeColor().replace("✔ ", "").replace("✖ ", "")
wikiInternalName = wikiDisplayName