#873 Save NewAPI object after construction
This commit is contained in:
parent
2d10b46df2
commit
476e0c197d
@ -25,11 +25,10 @@ public class NewAPI {
|
|||||||
|
|
||||||
public static NewAPI singleton;
|
public static NewAPI singleton;
|
||||||
public final AuthMe plugin;
|
public final AuthMe plugin;
|
||||||
|
private final PluginHooks pluginHooks;
|
||||||
private static PluginHooks pluginHooks;
|
private final DataSource dataSource;
|
||||||
private static DataSource dataSource;
|
private final PasswordSecurity passwordSecurity;
|
||||||
private static PasswordSecurity passwordSecurity;
|
private final Management management;
|
||||||
private static Management management;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Constructor for NewAPI.
|
* Constructor for NewAPI.
|
||||||
@ -38,17 +37,17 @@ public class NewAPI {
|
|||||||
NewAPI(AuthMe plugin, PluginHooks pluginHooks, DataSource dataSource, PasswordSecurity passwordSecurity,
|
NewAPI(AuthMe plugin, PluginHooks pluginHooks, DataSource dataSource, PasswordSecurity passwordSecurity,
|
||||||
Management management) {
|
Management management) {
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
NewAPI.pluginHooks = pluginHooks;
|
this.pluginHooks = pluginHooks;
|
||||||
NewAPI.dataSource = dataSource;
|
this.dataSource = dataSource;
|
||||||
NewAPI.passwordSecurity = passwordSecurity;
|
this.passwordSecurity = passwordSecurity;
|
||||||
NewAPI.management = management;
|
this.management = management;
|
||||||
|
NewAPI.singleton = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the API object for AuthMe.
|
* Get the API object for AuthMe.
|
||||||
*
|
*
|
||||||
* @return The API object, or null if the AuthMe plugin instance could not be retrieved
|
* @return The API object, or null if the AuthMe plugin is not enabled or not fully initialized yet
|
||||||
* from the server environment
|
|
||||||
*/
|
*/
|
||||||
public static NewAPI getInstance() {
|
public static NewAPI getInstance() {
|
||||||
if (singleton != null) {
|
if (singleton != null) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user