forked from TuxCoding/FastLogin
Do not try to hook into a plugin if auth plugin hook is already set using the FastLogin API
This commit is contained in:
@ -26,7 +26,7 @@ public class DelayedAuthHook implements Runnable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
boolean hookFound = registerHooks();
|
boolean hookFound = plugin.getCore().getAuthPluginHook() != null || registerHooks();
|
||||||
if (plugin.isBungeeCord()) {
|
if (plugin.isBungeeCord()) {
|
||||||
plugin.getLogger().info("BungeeCord setting detected. No auth plugin is required");
|
plugin.getLogger().info("BungeeCord setting detected. No auth plugin is required");
|
||||||
} else if (!hookFound) {
|
} else if (!hookFound) {
|
||||||
@ -69,7 +69,7 @@ public class DelayedAuthHook implements Runnable {
|
|||||||
plugin.getCore().setAuthPluginHook(authPluginHook);
|
plugin.getCore().setAuthPluginHook(authPluginHook);
|
||||||
plugin.setServerStarted();
|
plugin.setServerStarted();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user