mirror of
https://github.com/TuxCoding/FastLogin.git
synced 2025-07-30 02:37:34 +02:00
Increase hook delay to let ProtocolLib inject the listener
This commit is contained in:
@ -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
|
//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);
|
getServer().getPluginManager().registerEvents(new BukkitJoinListener(this), this);
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ public class CrackedCommand implements CommandExecutor {
|
|||||||
//todo: load async
|
//todo: load async
|
||||||
PlayerProfile profile = plugin.getCore().getStorage().loadProfile(args[0]);
|
PlayerProfile profile = plugin.getCore().getStorage().loadProfile(args[0]);
|
||||||
if (profile == null) {
|
if (profile == null) {
|
||||||
sender.sendMessage("Error occured");
|
sender.sendMessage("Error occurred");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,13 +31,14 @@ public class DelayedAuthHook implements Runnable {
|
|||||||
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) {
|
||||||
plugin.getLogger().warning("No auth plugin were found by this plugin "
|
plugin.getLogger().warning("No auth plugin were found by this plugin "
|
||||||
+ "(other plugins could hook into this after the intialization of this plugin)"
|
+ "(other plugins could hook into this after the initialization of this plugin)"
|
||||||
+ "and bungeecord is deactivated. "
|
+ "and BungeeCord is deactivated. "
|
||||||
+ "Either one or both of the checks have to pass in order to use this plugin");
|
+ "Either one or both of the checks have to pass in order to use this plugin");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(hookFound)
|
if (hookFound) {
|
||||||
plugin.setServerStarted();
|
plugin.setServerStarted();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean registerHooks() {
|
private boolean registerHooks() {
|
||||||
|
Reference in New Issue
Block a user