fix: replace afk team with normal team

This commit is contained in:
Simon Giesel 2020-05-31 22:17:05 +02:00
parent c4f7aecfa6
commit 6bcd8324fb

View file

@ -125,6 +125,12 @@ public class TeamManager {
public Team getTeamByPlayer(final String player) { public Team getTeamByPlayer(final String player) {
for (final Team team : this.teams) { for (final Team team : this.teams) {
if (team.hasEntry(player)) { if (team.hasEntry(player)) {
if (team.getName().startsWith("~")) {
for (final Team team2 : this.teams) {
if (team2.getName().equals(team.getName().replace("~", "")))
return team2;
}
}
return team; return team;
} }
} }