diff options
author | David Cole <40234707+DavidArthurCole@users.noreply.github.com> | 2024-10-02 13:10:49 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-02 19:10:49 +0200 |
commit | b45002ecafb9fd212d3c956dcd7b2249d6607a8b (patch) | |
tree | 2087db8246cee990267a2794a40c7bd4bd30f7e5 /src/main/java/at/hannibal2/skyhanni/features/event | |
parent | 2d24eb5a533b506e1b6119425edc7d117ec0f6a5 (diff) | |
download | skyhanni-b45002ecafb9fd212d3c956dcd7b2249d6607a8b.tar.gz skyhanni-b45002ecafb9fd212d3c956dcd7b2249d6607a8b.tar.bz2 skyhanni-b45002ecafb9fd212d3c956dcd7b2249d6607a8b.zip |
Improvement: Slight Touch up for Hoppity Event Summary (#2638)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/event')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEventSummary.kt | 10 |
1 files changed, 8 insertions, 2 deletions
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)}") |