fix player's current chat group not showing on join

This commit is contained in:
Husky
2024-02-29 15:50:19 -05:00
parent f10e47fb2f
commit 29af32f085
2 changed files with 7 additions and 0 deletions

View File

@@ -431,4 +431,8 @@ public class CivChat2Manager {
public void removeCustomName(UUID player) {
customNames.remove(player);
}
public ScoreboardHUD getScoreboardHUD() {
return scoreboardHUD;
}
}

View File

@@ -72,6 +72,9 @@ public class CivChat2Listener implements Listener {
p.sendMessage(playerJoinEvent.getPlayer().getDisplayName() + ChatColor.YELLOW + " has joined the game");
}
}
// Set current chat group in scoreboard
chatman.getScoreboardHUD().updateScoreboardHUD(playerJoinEvent.getPlayer());
if (CivChat2.getInstance().getPluginConfig().getChatRangeWarn() && !playerJoinEvent.getPlayer().hasPlayedBefore()) {
localWarn.add(playerJoinEvent.getPlayer().getUniqueId());