mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-27 12:45:25 +01:00
Run player login ASync.
This commit is contained in:
parent
01cb3fbfe2
commit
6225fec17b
@ -685,7 +685,8 @@ public class IslandManager {
|
|||||||
banManager.createIsland(island.getOwnerUUID());
|
banManager.createIsland(island.getOwnerUUID());
|
||||||
}
|
}
|
||||||
|
|
||||||
Bukkit.getServer().getPluginManager().callEvent(new IslandLoadEvent(island.getAPIWrapper()));
|
Bukkit.getScheduler().runTask(skyblock, () ->
|
||||||
|
Bukkit.getServer().getPluginManager().callEvent(new IslandLoadEvent(island.getAPIWrapper())));
|
||||||
|
|
||||||
return island;
|
return island;
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,7 @@ public class Join implements Listener {
|
|||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void onPlayerJoin(PlayerJoinEvent event) {
|
public void onPlayerJoin(PlayerJoinEvent event) {
|
||||||
|
Bukkit.getScheduler().runTaskAsynchronously(skyblock, () -> {
|
||||||
Player player = event.getPlayer();
|
Player player = event.getPlayer();
|
||||||
|
|
||||||
ScoreboardManager scoreboardManager = skyblock.getScoreboardManager();
|
ScoreboardManager scoreboardManager = skyblock.getScoreboardManager();
|
||||||
@ -146,5 +147,6 @@ public class Join implements Listener {
|
|||||||
|
|
||||||
// Load Challenge
|
// Load Challenge
|
||||||
SkyBlock.getInstance().getFabledChallenge().getPlayerManager().loadPlayer(player.getUniqueId());
|
SkyBlock.getInstance().getFabledChallenge().getPlayerManager().loadPlayer(player.getUniqueId());
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user