refactor: optimize plugin system

This commit is contained in:
2023-07-26 17:35:33 +08:00
parent 002f2c47c6
commit c07f1131c4
13 changed files with 95 additions and 48 deletions

View File

@@ -8,7 +8,7 @@ export namespace interfaces {
@injectable()
export abstract class Plugin implements plugin.Plugin {
public description: plugin.PluginMetadata
public logger: Console
public logger: MiaoScriptConsole
@inject(server.Console)
private Console: MiaoScriptConsole
@@ -28,6 +28,11 @@ export namespace interfaces {
return dataFolder.getAbsolutePath()
}
public registryCommand(executor: any) { }
public unregistryCommand(executor: any) { }
public registryListener(listener: any) { }
public unregistryListener(listener: any) { }
public load() { }
public enable() { }
public disable() { }