Increase hook delay to let ProtocolLib inject the listener

This commit is contained in:
games647
2017-06-30 17:37:03 +02:00
parent ea44002e91
commit 6595dc6ac0
3 changed files with 6 additions and 5 deletions

View File

@ -101,7 +101,7 @@ public class FastLoginBukkit extends JavaPlugin implements PlatformPlugin<Comman
}
//delay dependency setup because we load the plugin very early where plugins are initialized yet
getServer().getScheduler().runTask(this, new DelayedAuthHook(this));
getServer().getScheduler().runTaskLater(this, new DelayedAuthHook(this), 5L);
getServer().getPluginManager().registerEvents(new BukkitJoinListener(this), this);

View File

@ -66,7 +66,7 @@ public class CrackedCommand implements CommandExecutor {
//todo: load async
PlayerProfile profile = plugin.getCore().getStorage().loadProfile(args[0]);
if (profile == null) {
sender.sendMessage("Error occured");
sender.sendMessage("Error occurred");
return;
}

View File

@ -31,13 +31,14 @@ public class DelayedAuthHook implements Runnable {
plugin.getLogger().info("BungeeCord setting detected. No auth plugin is required");
} else if (!hookFound) {
plugin.getLogger().warning("No auth plugin were found by this plugin "
+ "(other plugins could hook into this after the intialization of this plugin)"
+ "and bungeecord is deactivated. "
+ "(other plugins could hook into this after the initialization of this plugin)"
+ "and BungeeCord is deactivated. "
+ "Either one or both of the checks have to pass in order to use this plugin");
}
if(hookFound)
if (hookFound) {
plugin.setServerStarted();
}
}
private boolean registerHooks() {