Fix for scoreboard on login

This commit is contained in:
Fabrizio La Rosa 2020-07-12 19:46:17 +02:00
parent 4452fa33fc
commit 5c0305e950

View File

@ -94,7 +94,7 @@ public class Join implements Listener {
PlayerData playerData = playerDataManager.getPlayerData(player);
playerData.setTexture(playerTexture[0], playerTexture[1]);
playerData.save();
Bukkit.getScheduler().runTaskAsynchronously(plugin, playerData::save);
} else {
playerDataManager.createPlayerData(player);
playerDataManager.loadPlayerData(player);
@ -106,7 +106,7 @@ public class Join implements Listener {
cooldownManager.addCooldownPlayer(CooldownType.Creation, cooldownManager.loadCooldownPlayer(CooldownType.Creation, player));
cooldownManager.addCooldownPlayer(CooldownType.Deletion, cooldownManager.loadCooldownPlayer(CooldownType.Deletion, player));
if (scoreboardManager != null) {
if (scoreboardManager != null && playerDataManager.getPlayerData(player).isScoreboard()) {
scoreboardManager.addPlayer(player);
}