diff options
author | Lulonaut <lulonaut@lulonaut.dev> | 2024-04-23 18:01:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-23 18:01:58 +0200 |
commit | 5883de1f3f1c3fa7c0eba411b0131ba2733dbf7f (patch) | |
tree | 296f77b724160a66777b589e53b25362a47e6abe /src/main/kotlin | |
parent | 6f1b131cd2ea580800ecf34c057022b785eb753a (diff) | |
download | NotEnoughUpdates-5883de1f3f1c3fa7c0eba411b0131ba2733dbf7f.tar.gz NotEnoughUpdates-5883de1f3f1c3fa7c0eba411b0131ba2733dbf7f.tar.bz2 NotEnoughUpdates-5883de1f3f1c3fa7c0eba411b0131ba2733dbf7f.zip |
Add support for Wrapping in the Tablist Widgets (#1099)
Diffstat (limited to 'src/main/kotlin')
-rw-r--r-- | src/main/kotlin/io/github/moulberry/notenoughupdates/miscfeatures/tablisttutorial/TablistAPI.kt | 10 |
1 files changed, 8 insertions, 2 deletions
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) |