SteamWar/FightSystem
Archiviert
13
1

Might fix #192 #196

Manuell gemergt
Lixfel hat 1 Commits von captainLeave nach master 2020-10-29 08:46:01 +01:00 zusammengeführt
2 geänderte Dateien mit 5 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -25,6 +25,7 @@ import de.steamwar.fightsystem.Config;
import de.steamwar.fightsystem.FightSystem; import de.steamwar.fightsystem.FightSystem;
import de.steamwar.fightsystem.IFightSystem; import de.steamwar.fightsystem.IFightSystem;
import de.steamwar.fightsystem.kit.KitManager; import de.steamwar.fightsystem.kit.KitManager;
import de.steamwar.fightsystem.listener.PersonalKitCreator;
import de.steamwar.fightsystem.states.FightState; import de.steamwar.fightsystem.states.FightState;
import de.steamwar.fightsystem.utils.*; import de.steamwar.fightsystem.utils.*;
import de.steamwar.fightsystem.winconditions.RankedPlayerLeftWincondition; import de.steamwar.fightsystem.winconditions.RankedPlayerLeftWincondition;
@ -222,6 +223,9 @@ public class FightTeam implements IFightTeam{
} }
return; return;
} }
if (!PersonalKitCreator.notInKitCreator(leader.getPlayer()))
leader.getPlayer().closeInventory();
this.leader = leader; this.leader = leader;
if(ready) if(ready)
setReady(false); setReady(false);

Datei anzeigen

@ -78,7 +78,7 @@ public class PersonalKitCreator extends BasicListener {
player.setGameMode(GameMode.CREATIVE); player.setGameMode(GameMode.CREATIVE);
} }
static boolean notInKitCreator(HumanEntity player){ public static boolean notInKitCreator(HumanEntity player){
return !openKitCreators.containsKey(player); return !openKitCreators.containsKey(player);
} }