Skip to content

Commit c5861ab

Browse files
committed
[6.1.0][dev] Update simple component
1 parent d038030 commit c5861ab

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

module/module-chat/src/main/kotlin/taboolib/module/chat/SimpleComponent.kt

+11-2
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,22 @@ import taboolib.common.platform.ProxyCommandSender
1212
interface SimpleComponent {
1313

1414
/** 构建为 RawMessage */
15-
fun build(transfer: TextTransfer.() -> Unit = {}): ComponentText
15+
fun build() = build { }
16+
17+
/** 构建为 RawMessage */
18+
fun build(transfer: TextTransfer.() -> Unit): ComponentText
19+
20+
/** 构建为 RawMessage,并上色 */
21+
fun buildColored() = build { colored() }
1622

1723
/** 构建为 RawMessage,并上色 */
18-
fun buildColored(transfer: TextTransfer.() -> Unit = {}): ComponentText {
24+
fun buildColored(transfer: TextTransfer.() -> Unit): ComponentText {
1925
return build { colored() }
2026
}
2127

28+
/** 直接构建为 RawMessage */
29+
fun buildToRaw() = buildToRaw { }
30+
2231
/** 直接构建为 RawMessage */
2332
fun buildToRaw(transfer: TextTransfer.() -> Unit = {}): String {
2433
return buildColored(transfer).toRawMessage()

0 commit comments

Comments
 (0)