diff options
author | J10a1n15 <45315647+j10a1n15@users.noreply.github.com> | 2024-05-11 10:02:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-11 10:02:37 +0200 |
commit | f4936b013b39b7ea6615087d6f2e92a1d8ed978e (patch) | |
tree | 370e394a492bebd01dc395a2ce5ecb54511a3d77 /src | |
parent | 013711f3e35c6a7e32a128364aeeb666643303cd (diff) | |
download | skyhanni-f4936b013b39b7ea6615087d6f2e92a1d8ed978e.tar.gz skyhanni-f4936b013b39b7ea6615087d6f2e92a1d8ed978e.tar.bz2 skyhanni-f4936b013b39b7ea6615087d6f2e92a1d8ed978e.zip |
Fix: Double Spooky Festival Time in Custom Scoreboard (#1757)
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt index a70174887..b05d77a11 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/gui/customscoreboard/ScoreboardEvents.kt @@ -15,6 +15,7 @@ import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland import at.hannibal2.skyhanni.utils.StringUtils.anyMatches import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher import at.hannibal2.skyhanni.utils.StringUtils.matches +import at.hannibal2.skyhanni.utils.StringUtils.removeColor import at.hannibal2.skyhanni.utils.StringUtils.removeResets import at.hannibal2.skyhanni.utils.TabListData import java.util.function.Supplier @@ -113,7 +114,9 @@ enum class ScoreboardEvents( SPOOKY( ::getSpookyLines, ::getSpookyShowWhen, - "§7(All Spooky Event Lines)" + "§6Spooky Festival§f 50:54\n" + + "§7Your Candy:\n" + + "§a1 Green§7, §50 Purple §7(§61 §7pts.)" ), BROODMOTHER( ::getBroodmotherLines, @@ -384,6 +387,12 @@ private fun getTablistEvent(): String? = private fun getActiveEventLine(): List<String> { val currentActiveEvent = getTablistEvent() ?: return emptyList() + + // Some Active Events are better not shown from the tablist, + // but from other locations like the scoreboard + val blockedEvents = listOf("Spooky Festival") + if (blockedEvents.contains(currentActiveEvent.removeColor())) return emptyList() + val currentActiveEventTime = TabListData.getTabList().firstOrNull { SbPattern.eventTimeEndsPattern.matches(it) } ?.let { SbPattern.eventTimeEndsPattern.matchMatcher(it) { |