Fix npe on join

This commit is contained in:
Fabrizio La Rosa 2020-08-04 00:24:24 +02:00
parent bc3c042dd1
commit c94860913e

View File

@ -114,9 +114,12 @@ public class Join implements Listener {
// Load Challenge
SkyBlock.getInstance().getFabledChallenge().getPlayerManager().loadPlayer(player.getUniqueId());
Bukkit.getScheduler().runTask(plugin, () -> {
if (scoreboardManager != null && playerDataManager.getPlayerData(player).isScoreboard()) {
scoreboardManager.updatePlayerScoreboardType(player);
}
});
});
if (scoreboardManager != null && playerDataManager.getPlayerData(player).isScoreboard()) {
scoreboardManager.updatePlayerScoreboardType(player);
}
}
}