I don't really understand the concept of singleton in my bukkit plugin. In my plugin I need to get the plugin data folder and change the json file. I have to use the functionthis.getDataFolder().getAbsolutePath();
but it cannot be used in my plugin because I use static functions.
I already tried to do something like this:
@Override
public void onEnable() {
File file = getFile();
}
public static getFile() {
return this.getDataFolder().getAbsolutePath();
}
I use static functions because my plugin is divided in multiple files.