fix: plugin bug

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
MiaoWoo 2020-09-24 15:27:51 +08:00
parent ed14d317f4
commit d85f75ba1f
2 changed files with 3 additions and 3 deletions

View File

@ -197,7 +197,7 @@ export class MiaoReward extends interfaces.Plugin {
} }
disable() { disable() {
this.server.getOnlinePlayers().forEach(p => this.checkAndClear(p)) Java.from(this.server.getOnlinePlayers()).forEach(p => this.checkAndClear(p))
this.channelOff?.off() this.channelOff?.off()
} }

View File

@ -430,7 +430,7 @@ return ''+ eval(${JSON.stringify(code)});`)
version: plugin.description.version, version: plugin.description.version,
source: base.read((plugin.description.source || plugin.description.loadMetadata.file).toString()) source: base.read((plugin.description.source || plugin.description.loadMetadata.file).toString())
}) })
this.i18n(sender, result.code == 200 ? 'deploy.success' : 'deploy.fail', { name, msg: result.msg }) this.i18n(sender, result.code == 200 ? 'deploy.success' : 'deploy.fail', { name, version: plugin.description.version, msg: result.msg })
} }
}).async().submit() }).async().submit()
} }
@ -445,7 +445,7 @@ return ''+ eval(${JSON.stringify(code)});`)
} }
@Tab({ alias: ['gmspm', 'bungeemspm'] }) @Tab({ alias: ['gmspm', 'bungeemspm'] })
tabmspm(args: string | any[]) { tabmspm(_sender: any, _command: any, args: string | any[]) {
if (args.length === 1) { return ['list', 'install', 'update', 'upgrade', 'reload', 'restart', 'run', 'help', 'create', 'deploy'] } if (args.length === 1) { return ['list', 'install', 'update', 'upgrade', 'reload', 'restart', 'run', 'help', 'create', 'deploy'] }
if (args.length > 1) { if (args.length > 1) {
switch (args[0]) { switch (args[0]) {