aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/event/hoppity/HoppityEventSummary.kt10
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)}")