refactor: optimize config & plugin load

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2021-06-22 15:51:13 +08:00
parent a4368cc9ba
commit 02dbf535bc
3 changed files with 40 additions and 28 deletions

View File

@@ -47,8 +47,8 @@ export class PluginCommandManager {
let subcommand = args[0] || 'help'
let cmdKey = 'cmd' + subcommand
if (!pluginInstance[cmdKey]) {
console.sender(sender, '§4未知的子命令: §c' + subcommand)
pluginInstance['cmdhelp'] && console.sender(sender, `§6请执行 §b/${command} §ahelp §6查看帮助!`)
pluginInstance.logger.sender(sender, '§4未知的子命令: §c' + subcommand)
pluginInstance['cmdhelp'] && pluginInstance.logger.sender(sender, `§6请执行 §b/${command} §ahelp §6查看帮助!`)
return
}
args.shift()