Fix issue with updating players that are offline.

This commit is contained in:
GJ 2013-11-01 12:38:40 -04:00
parent 811626e67b
commit 2e1c585005

View File

@ -193,8 +193,8 @@ public class ScoreboardManager {
} }
} }
if (Config.getInstance().getPowerLevelTagsEnabled()) { if (Config.getInstance().getPowerLevelTagsEnabled() && !dirtyPowerLevels.contains(playerName)) {
dirtyPowerLevels.add(player.getName()); dirtyPowerLevels.add(playerName);
} }
if (Config.getInstance().getSkillLevelUpBoard()) { if (Config.getInstance().getSkillLevelUpBoard()) {
@ -326,12 +326,13 @@ public class ScoreboardManager {
return false; // indicates return false; // indicates
} }
if (!dirtyPowerLevels.isEmpty()) { for (String playerName : dirtyPowerLevels) {
mcMMO.p.getLogger().info(dirtyPowerLevels.toString()); McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName, true);
if (mcMMOPlayer == null) {
continue;
} }
for (String playerName : dirtyPowerLevels) {
McMMOPlayer mcMMOPlayer = UserManager.getPlayer(playerName);
Player player = mcMMOPlayer.getPlayer(); Player player = mcMMOPlayer.getPlayer();
int power = mcMMOPlayer.getPowerLevel(); int power = mcMMOPlayer.getPowerLevel();