SteamWar/FightSystem
Archiviert
13
1

Merge pull request 'Fixed Entern before Entern' (#229) from fix-entern into master

Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Lixfel 2021-01-12 08:33:40 +01:00
Commit 3a869e03a3

Datei anzeigen

@ -64,7 +64,7 @@ public class PlayerMoveListener extends BasicListener {
if(inBlueArea){
if(fightTeam == null)
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);
else
return; // Is allowed in area
@ -72,7 +72,7 @@ public class PlayerMoveListener extends BasicListener {
}else if(inRedArea){
if(fightTeam == null)
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);
else
return; // Is allowed in area