Do not try to hook into a plugin if auth plugin hook is already set using the FastLogin API

This commit is contained in:
games647
2017-04-17 15:22:09 +02:00
parent 881b2ec7bc
commit 5bb8640d78

View File

@ -26,7 +26,7 @@ public class DelayedAuthHook implements Runnable {
@Override
public void run() {
boolean hookFound = registerHooks();
boolean hookFound = plugin.getCore().getAuthPluginHook() != null || registerHooks();
if (plugin.isBungeeCord()) {
plugin.getLogger().info("BungeeCord setting detected. No auth plugin is required");
} else if (!hookFound) {
@ -69,7 +69,7 @@ public class DelayedAuthHook implements Runnable {
plugin.getCore().setAuthPluginHook(authPluginHook);
plugin.setServerStarted();
}
return true;
}
}