Skip to content

Commit f7647cf

Browse files
committed
🎨(coreLib/lang) clean
1 parent d905b68 commit f7647cf

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

scripts/coreLibrary/lang.kts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ fun load() {
119119
lastSave = file.lastModified()
120120
}
121121

122-
registerVarForType<CommandContext.ConsoleReceiver>().registerChild("lang", "控制台语言", { console })
122+
registerVarForType<CommandContext.ConsoleReceiver>().registerChild("lang", "控制台语言") { console }
123123

124124
onEnable {
125125
val bak = PlaceHold.templateHandler
@@ -160,11 +160,11 @@ commands += CommandInfo(null, "set", "设置控制台使用语言".with()) {
160160
reply("[green]控制台语言已设为 {v}".with("v" to console))
161161
}
162162
}
163+
command("lang", "多语言功能".with(), commands = Commands.controlCommand) {
164+
requirePermission(dotId)
165+
body(commands)
166+
}
163167
onEnable {
164-
Commands.controlCommand += CommandInfo(this, "lang", "多语言功能".with()) {
165-
requirePermission(dotId)
166-
body(commands)
167-
}
168168
launch {
169169
load()
170170
while (isActive) {

0 commit comments

Comments
 (0)