fix: 修复自动化命令参数错误
Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
parent
1b0ea9fa05
commit
db526e9444
@ -20,7 +20,7 @@ export namespace plugin {
|
||||
export abstract class PluginManager {
|
||||
abstract scan(folder: string): void
|
||||
abstract build(): void
|
||||
abstract loadFromFile(file: string, scanner?: plugin.PluginScanner): Plugin
|
||||
abstract loadFromFile(file: string, ext: any): Plugin
|
||||
abstract load(...args: any[]): void
|
||||
abstract enable(...args: any[]): void
|
||||
abstract disable(...args: any[]): void
|
||||
|
@ -56,8 +56,9 @@ export class PluginCommandManager {
|
||||
let cmdKey = 'cmd' + subcommand
|
||||
let subcommandexec = pluginInstance[cmdKey]
|
||||
if (!subcommandexec) {
|
||||
args.shift()
|
||||
subcommandexec = pluginInstance['cmdmain']
|
||||
} else {
|
||||
args.shift()
|
||||
}
|
||||
if (!subcommandexec) {
|
||||
subcommand && pluginInstance.logger.sender(sender, '§4未知的子命令: §c' + subcommand)
|
||||
|
Loading…
Reference in New Issue
Block a user