Commit c5861ab 1 parent d038030 commit c5861ab Copy full SHA for c5861ab
File tree 1 file changed +11
-2
lines changed
module/module-chat/src/main/kotlin/taboolib/module/chat
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -12,13 +12,22 @@ import taboolib.common.platform.ProxyCommandSender
12
12
interface SimpleComponent {
13
13
14
14
/* * 构建为 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() }
16
22
17
23
/* * 构建为 RawMessage,并上色 */
18
- fun buildColored (transfer : TextTransfer .() -> Unit = {} ): ComponentText {
24
+ fun buildColored (transfer : TextTransfer .() -> Unit ): ComponentText {
19
25
return build { colored() }
20
26
}
21
27
28
+ /* * 直接构建为 RawMessage */
29
+ fun buildToRaw () = buildToRaw { }
30
+
22
31
/* * 直接构建为 RawMessage */
23
32
fun buildToRaw (transfer : TextTransfer .() -> Unit = {}): String {
24
33
return buildColored(transfer).toRawMessage()
You can’t perform that action at this time.
0 commit comments