From 21c0d9592720ce2857ba9797f98c5fdde5c27ee8 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sun, 12 Jan 2020 12:20:47 +0100 Subject: [PATCH] Hotfix team join order Signed-off-by: Lixfel --- .../steamwar/fightsystem/listener/NormalJoinListener.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/listener/NormalJoinListener.java b/FightSystem_Main/src/de/steamwar/fightsystem/listener/NormalJoinListener.java index f1739c3..b3df8aa 100644 --- a/FightSystem_Main/src/de/steamwar/fightsystem/listener/NormalJoinListener.java +++ b/FightSystem_Main/src/de/steamwar/fightsystem/listener/NormalJoinListener.java @@ -1,5 +1,6 @@ package de.steamwar.fightsystem.listener; +import de.steamwar.fightsystem.Config; import de.steamwar.fightsystem.countdown.Countdown; import de.steamwar.fightsystem.countdown.NoPlayersOnlineCountdown; import de.steamwar.fightsystem.countdown.SetupOverCountdown; @@ -18,10 +19,10 @@ public class NormalJoinListener extends BasicListener { FightTeam fightTeam = Fight.getPlayerTeam(player); if (fightTeam == null) { - if(Fight.getRedTeam().canbeLeader(player)) { - Fight.getRedTeam().setLeader(Fight.getRedTeam().addMember(player)); - } else if(Fight.getBlueTeam().canbeLeader(player)) { + if(!player.getUniqueId().equals(Config.RedLeader) && Fight.getBlueTeam().canbeLeader(player)) { Fight.getBlueTeam().setLeader(Fight.getBlueTeam().addMember(player)); + }else if(Fight.getRedTeam().canbeLeader(player)) { + Fight.getRedTeam().setLeader(Fight.getRedTeam().addMember(player)); } }