SteamWar/FightSystem
Archiviert
13
1

Fixed Entern before Entern #229

Manuell gemergt
Lixfel hat 1 Commits von fix-entern nach master 2021-01-12 08:33:41 +01:00 zusammengeführt
Nur Änderungen aus Commit dd8dddb3a8 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -64,7 +64,7 @@ public class PlayerMoveListener extends BasicListener {
if(inBlueArea){ if(inBlueArea){
if(fightTeam == null) if(fightTeam == null)
reset(event, DENY_TEAM); reset(event, DENY_TEAM);
else if(fightTeam == Fight.getRedTeam() && player.getGameMode() == GameMode.SPECTATOR) else if(fightTeam == Fight.getRedTeam() && (player.getGameMode() == GameMode.SPECTATOR || !fightTeam.canPlayerEntern(player)))
reset(event, DENY_ENTERN); reset(event, DENY_ENTERN);
else else
return; // Is allowed in area return; // Is allowed in area
@ -72,7 +72,7 @@ public class PlayerMoveListener extends BasicListener {
}else if(inRedArea){ }else if(inRedArea){
if(fightTeam == null) if(fightTeam == null)
reset(event, DENY_TEAM); reset(event, DENY_TEAM);
else if(fightTeam == Fight.getBlueTeam() && player.getGameMode() == GameMode.SPECTATOR) else if(fightTeam == Fight.getBlueTeam() && (player.getGameMode() == GameMode.SPECTATOR || !fightTeam.canPlayerEntern(player)))
reset(event, DENY_ENTERN); reset(event, DENY_ENTERN);
else else
return; // Is allowed in area return; // Is allowed in area