diff --git a/src/main/java/com/gmail/nossr50/listeners/TagListener.java b/src/main/java/com/gmail/nossr50/listeners/TagListener.java index 76fdb9dbf..1d4128f76 100644 --- a/src/main/java/com/gmail/nossr50/listeners/TagListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/TagListener.java @@ -8,6 +8,7 @@ import org.bukkit.event.Listener; import com.gmail.nossr50.datatypes.player.McMMOPlayer; import com.gmail.nossr50.util.player.UserManager; +import com.gmail.nossr50.util.scoreboards.ScoreboardManager; import org.kitteh.tag.AsyncPlayerReceiveNameTagEvent; @@ -32,6 +33,7 @@ public class TagListener implements Listener { if (colorlessTag.equals(player.getName()) && (mcMMOPlayer.getNameTag() == null || !mcMMOPlayer.getNameTag().equals(tag))) { mcMMOPlayer.setNameTag(tag); + ScoreboardManager.tagUpdate(player); } /* diff --git a/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardManager.java b/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardManager.java index e4c34e560..70ee5b08c 100644 --- a/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardManager.java +++ b/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardManager.java @@ -224,6 +224,15 @@ public class ScoreboardManager { } } + // Called by internal TagAPI event listener + public static void tagUpdate(Player player) { + String playerName = player.getName(); + + if (Config.getInstance().getPowerLevelTagsEnabled() && !dirtyPowerLevels.contains(playerName)) { + dirtyPowerLevels.add(playerName); + } + } + // **** Setup methods **** // public static void enablePlayerSkillScoreboard(Player player, SkillType skill) {