feat: disable friendly fire in Teams

This commit is contained in:
Simon Giesel 2020-05-19 23:43:47 +02:00
parent 3d07798315
commit 199e1efae5

View file

@ -62,6 +62,7 @@ public class TeamManager {
this.teams.add(team); this.teams.add(team);
this.teams.add(afkTeam); this.teams.add(afkTeam);
team.setPrefix(ChatColor.valueOf((String) jsonTeam.get("color")) + "§l[" + jsonTeam.get("prefix") + "] "); team.setPrefix(ChatColor.valueOf((String) jsonTeam.get("color")) + "§l[" + jsonTeam.get("prefix") + "] ");
team.setAllowFriendlyFire(false);
afkTeam.setPrefix("§8§l[AFK] "); afkTeam.setPrefix("§8§l[AFK] ");
team.setColor(ChatColor.WHITE); team.setColor(ChatColor.WHITE);
afkTeam.setColor(ChatColor.valueOf((String) jsonTeam.get("color"))); afkTeam.setColor(ChatColor.valueOf((String) jsonTeam.get("color")));
@ -78,7 +79,7 @@ public class TeamManager {
final JSONObject player = (JSONObject) rawPlayer; final JSONObject player = (JSONObject) rawPlayer;
try { try {
final String result = WebUtils final String result = WebUtils
.GET("https://sessionserver.mojang.com/session/minecraft/profile/" + player.get("uuid")); .GET("https://sessionserver.mojang.com/session/minecraft/profile/" + player.get("uuid")); // TODO Async
if (result.isEmpty()) { if (result.isEmpty()) {
continue; continue;
} }