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 127e50c..a644600 100644 --- a/varo/src/main/java/de/cliffbreak/varo/managers/TeamManager.java +++ b/varo/src/main/java/de/cliffbreak/varo/managers/TeamManager.java @@ -44,18 +44,18 @@ public class TeamManager { final Team team, afkTeam; if (jsonTeam.get("Name") == null) continue; - if (scoreboard.getTeam((String) jsonTeam.get("Name")) == null) { + if (this.scoreboard.getTeam((String) jsonTeam.get("Name")) == null) { team = this.scoreboard.registerNewTeam((String) jsonTeam.get("Name")); } else { - team = scoreboard.getTeam((String) jsonTeam.get("Name")); + team = this.scoreboard.getTeam((String) jsonTeam.get("Name")); } - if (scoreboard.getTeam("afk" + jsonTeam.get("Name")) == null) { + if (this.scoreboard.getTeam("afk" + jsonTeam.get("Name")) == null) { afkTeam = this.scoreboard.registerNewTeam("afk" + jsonTeam.get("Name")); } else { - afkTeam = scoreboard.getTeam("afk" + jsonTeam.get("Name")); + afkTeam = this.scoreboard.getTeam("afk" + jsonTeam.get("Name")); } - teams.add(team); - teams.add(afkTeam); + this.teams.add(team); + this.teams.add(afkTeam); team.setPrefix(ChatColor.valueOf((String) jsonTeam.get("Color")) + "§l[" + jsonTeam.get("Prefix") + "] "); afkTeam.setPrefix("§8§l[AFK] "); team.setColor(ChatColor.WHITE); @@ -94,8 +94,8 @@ public class TeamManager { return null; } - public void setAFK(String player) { - Team oldTeam = getTeamByPlayer(player); + public void setAFK(final String player) { + final Team oldTeam = getTeamByPlayer(player); for (final Team team : this.teams) { if (team.getName().equals("afk" + oldTeam.getName())) { team.addEntry(player); @@ -103,12 +103,12 @@ public class TeamManager { } } - public void setTeam(Player player) { + public void setTeam(final Player player) { final JSONArray jsonTeams = config.getArray("Teams"); for (final Object jsonRawTeam : jsonTeams) { - JSONObject jsonTeam = (JSONObject) jsonRawTeam; + final JSONObject jsonTeam = (JSONObject) jsonRawTeam; if (((JSONArray) jsonTeam.get("Players")).contains(player.getUniqueId().toString().replace("-", ""))) { - for (Team team : this.teams) { + for (final Team team : this.teams) { if (team.getName().equals(jsonTeam.get("Name").toString())) { team.addEntry(player.getName()); }