@@ -12,10 +12,10 @@ import ru.endlesscode.mimic.config.StringSetConfigProperty
1212import ru.endlesscode.mimic.internal.append
1313import ru.endlesscode.mimic.internal.appendClickable
1414import ru.endlesscode.mimic.internal.appendLine
15- import ru.endlesscode.mimic.internal.buildTextComponent
15+ import ru.endlesscode.mimic.internal.text
1616
1717@OptIn(ExperimentalMimicApi ::class )
18- internal fun buildConfigMessage (mimic : Mimic , config : MimicConfig ): TextComponent = buildTextComponent {
18+ internal fun buildConfigMessage (mimic : Mimic , config : MimicConfig ): TextComponent = text {
1919 appendLine(" ----[ Mimic Config ]----" )
2020 appendSelectablePropertyConfig(
2121 property = MimicConfig .LEVEL_SYSTEM ,
@@ -53,7 +53,7 @@ private fun TextComponent.Builder.appendSelectablePropertyConfig(
5353 availableOptions,
5454 hint = " Click to select" ,
5555 color = NamedTextColor .GRAY ,
56- resolveCommand = { " /mimic config ${property.path} $it " },
56+ resolveCommand = { " /$COMMAND_NAME config ${property.path} $it " },
5757 )
5858 }
5959
@@ -76,14 +76,14 @@ private fun TextComponent.Builder.appendSetPropertyConfig(
7676 hint = " Click to add" ,
7777 color = NamedTextColor .GRAY ,
7878 nonClickableOptions = permanentOptions,
79- resolveCommand = { " /mimic config ${property.path} add $it " },
79+ resolveCommand = { " /$COMMAND_NAME config ${property.path} add $it " },
8080 )
8181
8282 appendLine()
8383 appendPropertyPath(property)
8484 append(" [" )
8585 appendSelectableOptions(values, hint = " Click to remove" ) {
86- " /mimic config ${property.path} remove $it "
86+ " /$COMMAND_NAME config ${property.path} remove $it "
8787 }
8888 append(" ]" )
8989}
@@ -103,7 +103,7 @@ private fun TextComponent.Builder.appendSelectableOptions(
103103 resolveCommand : (String ) -> String ,
104104) = append(
105105 options.mapIndexed { index, option ->
106- buildTextComponent {
106+ text {
107107 color(color)
108108 if (index != 0 ) append(" , " )
109109 if (option !in nonClickableOptions) {
0 commit comments