feat: update typescript version

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2021-12-26 01:21:06 +08:00
parent 72173b4778
commit 5ed61829e1
68 changed files with 234 additions and 161 deletions

View File

@@ -2,6 +2,8 @@ import { server, MiaoScriptConsole, event, plugin } from "@ccms/api"
import { injectable, inject, postConstruct } from "@ccms/container"
import { getPluginMetadata } from "./utils"
const File = Java.type('java.io.File')
export namespace interfaces {
@injectable()
export abstract class Plugin implements plugin.Plugin {
@@ -20,6 +22,12 @@ export namespace interfaces {
this.logger = new this.Console(this.description.prefix || this.description.name)
}
public getDataFolder() {
let parent = new File(this.description.source).parent
let dataFolder = new File(parent, this.description.name)
return dataFolder.getAbsolutePath()
}
public load() { }
public enable() { }
public disable() { }