SteamWar/BungeeCore
Archiviert
13
2

Merge pull request 'Green color online teammembers' (#166) from onlineFarbigMarkiert into master

Reviewed-by: YoyoNow <jwsteam@nidido.de>
Dieser Commit ist enthalten in:
Lixfel 2021-01-04 18:45:33 +01:00
Commit 9b6b880efb

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!"); 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){ private void info(ProxiedPlayer player, SteamwarUser user, Team team, String[] args){
if(args.length == 1 && user.getTeam() == 0){ if(args.length == 1 && user.getTeam() == 0){
BungeeCore.send(player, BungeeCore.CHAT_PREFIX + "§8/§eteam info §8[§eTeamname§8]"); 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, "§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) { if(team.getMembers().size() > 1) {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("§7Member§8: §e"); sb.append("§7Member§8: ");
List<Integer> members = team.getMembers(); List<Integer> members = team.getMembers();
for (int i : members) { for (int i : members) {
if (i == team.getTeamLeader()) if (i == team.getTeamLeader())
continue; continue;
SteamwarUser m = SteamwarUser.get(i); sb.append(playerName(SteamwarUser.get(i))).append(" ");
sb.append(m.getUserName()).append(" ");
} }
BungeeCore.send(player, sb.toString()); BungeeCore.send(player, sb.toString());
} }