|
8 | 8 | import org.bukkit.event.Listener; |
9 | 9 |
|
10 | 10 | public class NLoginAuthenticate implements Listener { |
11 | | - private AdvancedCorePlugin plugin; |
| 11 | + private AdvancedCorePlugin plugin; |
12 | 12 |
|
13 | | - public NLoginAuthenticate(AdvancedCorePlugin plugin) { |
14 | | - this.plugin = plugin; |
15 | | - } |
| 13 | + public NLoginAuthenticate(AdvancedCorePlugin plugin) { |
| 14 | + this.plugin = plugin; |
| 15 | + } |
16 | 16 |
|
17 | | - @EventHandler |
18 | | - public void nLoginLogin(AuthenticateEvent event) { |
| 17 | + @EventHandler |
| 18 | + public void nLoginLogin(AuthenticateEvent event) { |
19 | 19 |
|
20 | | - plugin.getBukkitScheduler().runTaskLaterAsynchronously(plugin, () -> { |
21 | | - if (event.getPlayer() != null) { |
22 | | - if (plugin.getOptions().isWaitUntilLoggedIn()) { |
23 | | - plugin.debug("nLogin Login: " + event.getPlayer().getName() + " (" |
24 | | - + PlayerManager.getInstance().getUUID(event.getPlayer().getName()) + ")"); |
25 | | - AdvancedCoreLoginEvent login = new AdvancedCoreLoginEvent(event.getPlayer()); |
26 | | - Bukkit.getPluginManager().callEvent(login); |
27 | | - } |
28 | | - } |
29 | | - }, 2); |
30 | | - } |
| 20 | + plugin.getBukkitScheduler().runTaskLaterAsynchronously(plugin, () -> { |
| 21 | + if (event.getPlayer() != null) { |
| 22 | + if (plugin.getOptions().isWaitUntilLoggedIn()) { |
| 23 | + plugin.debug("nLogin Login: " + event.getPlayer().getName() + " (" |
| 24 | + + PlayerManager.getInstance().getUUID(event.getPlayer().getName()) + ")"); |
| 25 | + AdvancedCoreLoginEvent login = new AdvancedCoreLoginEvent(event.getPlayer()); |
| 26 | + Bukkit.getPluginManager().callEvent(login); |
| 27 | + } |
| 28 | + } |
| 29 | + }, 2 + (plugin.getOptions().getDelayLoginEvent() / 50)); |
| 30 | + } |
31 | 31 | } |
0 commit comments