From b45002ecafb9fd212d3c956dcd7b2249d6607a8b Mon Sep 17 00:00:00 2001 From: David Cole <40234707+DavidArthurCole@users.noreply.github.com> Date: Wed, 2 Oct 2024 13:10:49 -0400 Subject: Improvement: Slight Touch up for Hoppity Event Summary (#2638) --- .../skyhanni/features/event/hoppity/HoppityEventSummary.kt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/main/java/at/hannibal2/skyhanni') diff --git a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEventSummary.kt b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEventSummary.kt index 0d4e09b9c..b2f806c80 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEventSummary.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEventSummary.kt @@ -231,12 +231,18 @@ object HoppityEventSummary { config.eventSummary.statDisplayList.forEach { summaryOperationList[it]?.invoke(statsBuilder, stats, eventYear) } + + // If no stats are found, display a message if (statsBuilder.toString().replace("\n", "").isEmpty()) { - statsBuilder.appendHeadedLine("§c§lNothing to show!\n§c§oGo find some eggs!") + statsBuilder.appendHeadedLine("§c§lNothing to show!") + statsBuilder.appendHeadedLine("§c§oGo find some eggs!") } + // Remove any consecutive empty lines in the stats + val statsBuilderString = statsBuilder.toString().replace(Regex("\n{4,}"), "\n".repeat(3)) + // Append stats - summaryBuilder.append(statsBuilder) + summaryBuilder.append(statsBuilderString) // Footer summaryBuilder.append("§d§l${"▬".repeat(64)}") -- cgit