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