From 5883de1f3f1c3fa7c0eba411b0131ba2733dbf7f Mon Sep 17 00:00:00 2001 From: Lulonaut Date: Tue, 23 Apr 2024 18:01:58 +0200 Subject: Add support for Wrapping in the Tablist Widgets (#1099) --- .../miscfeatures/tablisttutorial/TablistAPI.kt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/main') diff --git a/src/main/kotlin/io/github/moulberry/notenoughupdates/miscfeatures/tablisttutorial/TablistAPI.kt b/src/main/kotlin/io/github/moulberry/notenoughupdates/miscfeatures/tablisttutorial/TablistAPI.kt index 277ed6e3..0ab086b4 100644 --- a/src/main/kotlin/io/github/moulberry/notenoughupdates/miscfeatures/tablisttutorial/TablistAPI.kt +++ b/src/main/kotlin/io/github/moulberry/notenoughupdates/miscfeatures/tablisttutorial/TablistAPI.kt @@ -57,10 +57,16 @@ object TablistAPI { } if (list.isNotEmpty()) { - // New tab section, or empty line indicate a new section - if (entry == "§r §r§3§lInfo§r" || entry == "§r") { + // Empty line, the widget ends here. + if (entry == "§r") { break } + + // New tab column, ignore it and continue with the same widget + if (entry == "§r §r§3§lInfo§r") { + continue + } + list.add(entry) } else if (entry.stripControlCodes().matches(regex)) { list.add(entry) -- cgit