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 {
|
export abstract class PluginManager {
|
||||||
abstract scan(folder: string): void
|
abstract scan(folder: string): void
|
||||||
abstract build(): 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 load(...args: any[]): void
|
||||||
abstract enable(...args: any[]): void
|
abstract enable(...args: any[]): void
|
||||||
abstract disable(...args: any[]): void
|
abstract disable(...args: any[]): void
|
||||||
|
@ -56,8 +56,9 @@ export class PluginCommandManager {
|
|||||||
let cmdKey = 'cmd' + subcommand
|
let cmdKey = 'cmd' + subcommand
|
||||||
let subcommandexec = pluginInstance[cmdKey]
|
let subcommandexec = pluginInstance[cmdKey]
|
||||||
if (!subcommandexec) {
|
if (!subcommandexec) {
|
||||||
args.shift()
|
|
||||||
subcommandexec = pluginInstance['cmdmain']
|
subcommandexec = pluginInstance['cmdmain']
|
||||||
|
} else {
|
||||||
|
args.shift()
|
||||||
}
|
}
|
||||||
if (!subcommandexec) {
|
if (!subcommandexec) {
|
||||||
subcommand && pluginInstance.logger.sender(sender, '§4未知的子命令: §c' + subcommand)
|
subcommand && pluginInstance.logger.sender(sender, '§4未知的子命令: §c' + subcommand)
|
||||||
|
Loading…
Reference in New Issue
Block a user