@@ -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() { }
|
||||
|
||||
Reference in New Issue
Block a user