SteamWar/BungeeCore
Archiviert
13
2

Green color online teammembers

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2021-01-04 18:42:48 +01:00
Ursprung 8d9953d9db
Commit 1ac51e54e1

Datei anzeigen

@ -389,6 +389,10 @@ public class TeamCommand extends BasicCommand {
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§7Du hast den Spieler §e" + args[1] + " §7zum Leader gemacht!");
}
private String playerName(SteamwarUser user){
return ProxyServer.getInstance().getPlayer(user.getUuid()) != null ? "§a" + user.getUserName() : "§e" + user.getUserName();
}
private void info(ProxiedPlayer player, SteamwarUser user, Team team, String[] args){
if(args.length == 1 && user.getTeam() == 0){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§8/§eteam info §8[§eTeamname§8]");
@ -403,17 +407,16 @@ public class TeamCommand extends BasicCommand {
}
BungeeCore.send(player, "§7Team §e" + team.getTeamName() + " §8[§" + team.getTeamColor() + team.getTeamKuerzel() + "§8]");
BungeeCore.send(player, "§7Leader§8: " + SteamwarUser.get(team.getTeamLeader()).getUserName());
BungeeCore.send(player, "§7Leader§8: " + playerName(SteamwarUser.get(team.getTeamLeader())));
if(team.getMembers().size() > 1) {
StringBuilder sb = new StringBuilder();
sb.append("§7Member§8: §e");
sb.append("§7Member§8: ");
List<Integer> members = team.getMembers();
for (int i : members) {
if (i == team.getTeamLeader())
continue;
SteamwarUser m = SteamwarUser.get(i);
sb.append(m.getUserName()).append(" ");
sb.append(playerName(SteamwarUser.get(i))).append(" ");
}
BungeeCore.send(player, sb.toString());
}