diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-12-01 12:48:37 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-12-01 12:48:37 +0100 |
commit | 1d67ee3683080cdf0807350288fdb0670027e321 (patch) | |
tree | 7a118b1077e93bbcd8e1ff6933fc471f88643a79 /src/main/java/at/hannibal2 | |
parent | 3c1d534472fbd83a24799a3df7ce7c80c764597e (diff) | |
download | skyhanni-1d67ee3683080cdf0807350288fdb0670027e321.tar.gz skyhanni-1d67ee3683080cdf0807350288fdb0670027e321.tar.bz2 skyhanni-1d67ee3683080cdf0807350288fdb0670027e321.zip |
Added support for the community goal suffix
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardTips.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardTips.kt b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardTips.kt index 22925b405..4b5bca2e5 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardTips.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/bingo/BingoCardTips.kt @@ -27,7 +27,8 @@ class BingoCardTips { val toolTip = event.toolTip val communityGoal = toolTip.getOrNull(1) == "§5§o§8Community Goal" val bingoTip: BingoTip = if (communityGoal) { - BingoAPI.tips.filter { itemName.startsWith(it.key) }.values.firstOrNull() ?: return + // We added the suffix (Community Goal) so that older skyhanni versions don't crash with the new repo data. + BingoAPI.tips.filter { itemName.startsWith(it.key.split(" (Community Goal)")[0]) }.values.firstOrNull() ?: return } else { BingoAPI.tips[itemName] ?: return } |