mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-27 20:57:35 +01:00
init instance at the top, to avoid problems.
This commit is contained in:
parent
2fe9e735a1
commit
9736e4c207
@ -53,9 +53,9 @@ import java.util.zip.GZIPInputStream;
|
||||
|
||||
public class AuthMe extends JavaPlugin {
|
||||
|
||||
public static Server server;
|
||||
public static Logger authmeLogger = Logger.getLogger("AuthMe");
|
||||
public static AuthMe authme;
|
||||
private static Server server;
|
||||
private static Logger authmeLogger = Logger.getLogger("AuthMe");
|
||||
private static AuthMe authme;
|
||||
public Management management;
|
||||
public NewAPI api;
|
||||
private Utils utils = Utils.getInstance();
|
||||
@ -115,6 +115,8 @@ public class AuthMe extends JavaPlugin {
|
||||
|
||||
@Override
|
||||
public void onEnable() {
|
||||
// Set the Instance
|
||||
authme = this;
|
||||
|
||||
// TODO: split the plugin in more modules
|
||||
// TODO: remove vault as hard dependency
|
||||
@ -125,9 +127,6 @@ public class AuthMe extends JavaPlugin {
|
||||
// Setup the Logger
|
||||
authmeLogger.setParent(this.getLogger());
|
||||
|
||||
// Set the Instance
|
||||
authme = this;
|
||||
|
||||
// Setup otherAccounts file
|
||||
otherAccounts = OtherAccounts.getInstance();
|
||||
|
||||
|
@ -28,7 +28,7 @@ public class JsonCache {
|
||||
|
||||
public JsonCache(AuthMe plugin) {
|
||||
this.plugin = plugin;
|
||||
cacheDir = new File(plugin.getDataFolder() + File.separator + "cache");
|
||||
cacheDir = new File(plugin.getDataFolder(), "cache");
|
||||
if (!cacheDir.exists() && !cacheDir.isDirectory() && !cacheDir.mkdir()) {
|
||||
ConsoleLogger.showError("Failed to create cache directory.");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user