From f4936b013b39b7ea6615087d6f2e92a1d8ed978e Mon Sep 17 00:00:00 2001 From: J10a1n15 <45315647+j10a1n15@users.noreply.github.com> Date: Sat, 11 May 2024 10:02:37 +0200 Subject: Fix: Double Spooky Festival Time in Custom Scoreboard (#1757) --- .../features/gui/customscoreboard/ScoreboardEvents.kt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/main/java') 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 { 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) { -- cgit