Skip to content

Commit bdd0c9b

Browse files
committed
fix: return of builder creates confusion and relates to duplications
1 parent 04bf234 commit bdd0c9b

File tree

1 file changed

+5
-4
lines changed
  • src/main/kotlin/de/fruxz/stacked/extension

1 file changed

+5
-4
lines changed
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
package de.fruxz.stacked.extension
22

3+
import de.fruxz.ascend.extension.dump
34
import de.fruxz.stacked.Stacked
45
import net.kyori.adventure.text.Component
56
import net.kyori.adventure.text.TextComponent
67

78
@Stacked
8-
fun TextComponent.Builder.newlines(amount: Int) = apply { repeat(amount) { append(Component.newline()) } }
9+
fun TextComponent.Builder.newlines(amount: Int) = apply { repeat(amount) { append(Component.newline()) } }.dump()
910

1011
@Stacked
11-
fun TextComponent.Builder.newline() = apply { append(Component.newline()) }
12+
fun TextComponent.Builder.newline() = apply { append(Component.newline()) }.dump()
1213

1314
@Stacked
14-
fun TextComponent.Builder.space() = append(Component.space())
15+
fun TextComponent.Builder.space() = append(Component.space()).dump()
1516

1617
@Stacked
17-
fun TextComponent.Builder.spaces(amount: Int) = apply { repeat(amount) { space() } }
18+
fun TextComponent.Builder.spaces(amount: Int) = apply { repeat(amount) { space() } }.dump()

0 commit comments

Comments
 (0)