feat: disable friendly fire in Teams
This commit is contained in:
parent
3d07798315
commit
199e1efae5
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue