mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-09 04:02:10 +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 class AuthMe extends JavaPlugin {
|
||||||
|
|
||||||
public static Server server;
|
private static Server server;
|
||||||
public static Logger authmeLogger = Logger.getLogger("AuthMe");
|
private static Logger authmeLogger = Logger.getLogger("AuthMe");
|
||||||
public static AuthMe authme;
|
private static AuthMe authme;
|
||||||
public Management management;
|
public Management management;
|
||||||
public NewAPI api;
|
public NewAPI api;
|
||||||
private Utils utils = Utils.getInstance();
|
private Utils utils = Utils.getInstance();
|
||||||
@ -115,6 +115,8 @@ public class AuthMe extends JavaPlugin {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
|
// Set the Instance
|
||||||
|
authme = this;
|
||||||
|
|
||||||
// TODO: split the plugin in more modules
|
// TODO: split the plugin in more modules
|
||||||
// TODO: remove vault as hard dependency
|
// TODO: remove vault as hard dependency
|
||||||
@ -125,9 +127,6 @@ public class AuthMe extends JavaPlugin {
|
|||||||
// Setup the Logger
|
// Setup the Logger
|
||||||
authmeLogger.setParent(this.getLogger());
|
authmeLogger.setParent(this.getLogger());
|
||||||
|
|
||||||
// Set the Instance
|
|
||||||
authme = this;
|
|
||||||
|
|
||||||
// Setup otherAccounts file
|
// Setup otherAccounts file
|
||||||
otherAccounts = OtherAccounts.getInstance();
|
otherAccounts = OtherAccounts.getInstance();
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ public class JsonCache {
|
|||||||
|
|
||||||
public JsonCache(AuthMe plugin) {
|
public JsonCache(AuthMe plugin) {
|
||||||
this.plugin = 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()) {
|
if (!cacheDir.exists() && !cacheDir.isDirectory() && !cacheDir.mkdir()) {
|
||||||
ConsoleLogger.showError("Failed to create cache directory.");
|
ConsoleLogger.showError("Failed to create cache directory.");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user