mirror of
https://github.com/jie65535/JGrasscutterCommand.git
synced 2025-07-31 18:39:55 +08:00
Add Public Commands
This commit is contained in:
parent
08231d4c27
commit
7e50624261
@ -326,5 +326,18 @@ object PluginCommands : CompositeCommand(
|
|||||||
sendMessage("OK")
|
sendMessage("OK")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SubCommand
|
||||||
|
@Description("添加公开命令(游客可执行)(可用别名)")
|
||||||
|
suspend fun CommandSender.addPublicCommand(command: String) {
|
||||||
|
PluginConfig.publicCommand.add(command)
|
||||||
|
sendMessage("OK")
|
||||||
|
}
|
||||||
|
@SubCommand
|
||||||
|
@Description("删除公开命令")
|
||||||
|
suspend fun CommandSender.removePublicCommand(alias: String) {
|
||||||
|
PluginConfig.publicCommand.remove(alias)
|
||||||
|
sendMessage("OK")
|
||||||
|
}
|
||||||
|
|
||||||
// endregion
|
// endregion
|
||||||
}
|
}
|
@ -49,4 +49,9 @@ object PluginConfig : AutoSavePluginConfig("config") {
|
|||||||
|
|
||||||
// TODO ...
|
// TODO ...
|
||||||
))
|
))
|
||||||
|
|
||||||
|
@ValueDescription("公开命令,无需绑定账号也可以执行(可用别名)(必须绑定了控制台令牌才可使用)")
|
||||||
|
val publicCommand: MutableSet<String> by value(mutableSetOf(
|
||||||
|
"/list", "/list uid"
|
||||||
|
))
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user