From 6bcd8324fb2f2eac64163c969bf4bc7fdf28ec5c Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 31 May 2020 22:17:05 +0200 Subject: [PATCH] fix: replace afk team with normal team --- .../main/java/de/cliffbreak/varo/managers/TeamManager.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/varo/src/main/java/de/cliffbreak/varo/managers/TeamManager.java b/varo/src/main/java/de/cliffbreak/varo/managers/TeamManager.java index 52e40db..ccf8a17 100644 --- a/varo/src/main/java/de/cliffbreak/varo/managers/TeamManager.java +++ b/varo/src/main/java/de/cliffbreak/varo/managers/TeamManager.java @@ -125,6 +125,12 @@ public class TeamManager { public Team getTeamByPlayer(final String player) { for (final Team team : this.teams) { 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; } }