feat: add remove plugin on disable
Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
@ -27,6 +27,12 @@ export class BukkitCommand extends command.Command {
|
||||
this.commandMap.register(plugin.description.name, cmd);
|
||||
return cmd;
|
||||
}
|
||||
remove(plugin: any, command: string) {
|
||||
var cmd = this.commandMap.getCommand(command)
|
||||
if (cmd && cmd instanceof PluginCommand) {
|
||||
cmd.unregister(this.commandMap);
|
||||
}
|
||||
}
|
||||
onCommand(plugin: any, command: any, executor: Function) {
|
||||
// 必须指定需要实现的接口类型 否则MOD服会报错
|
||||
command.setExecutor(new CommandExecutor({
|
||||
|
Reference in New Issue
Block a user