SteamWar/FightSystem
Archiviert
13
1

Fix respawn on spectate

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2021-03-31 21:46:01 +02:00
Ursprung fe28d387dd
Commit 8634db5d78

Datei anzeigen

@ -421,7 +421,12 @@ public class FightTeam implements IFightTeam{
@Override @Override
public void enable() { public void enable() {
players.values().forEach(fightPlayer -> Fight.setPlayerGamemode(fightPlayer.getPlayer(), GameMode.SPECTATOR)); players.values().forEach(fightPlayer -> {
Fight.setPlayerGamemode(fightPlayer.getPlayer(), GameMode.SPECTATOR);
if(Fight.getOpposite(FightTeam.this).getExtendRegion().playerInRegion(fightPlayer.getPlayer().getLocation())){
fightPlayer.getPlayer().teleport(FightTeam.this.spawn);
}
});
} }
@Override @Override