SteamWar/FightSystem
Archiviert
13
1

Improving size of spectator space

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2020-05-16 16:59:35 +02:00
Ursprung ac6b441815
Commit 1608f895a8

Datei anzeigen

@ -40,13 +40,18 @@ public class PlayerMoveListener extends BasicListener {
boolean inBlueArea = inArenaY && Region.isIn2DRange(to, Config.TeamBlueCornerX, Config.TeamBlueCornerZ, Config.SchemsizeX, Config.SchemsizeZ, Config.BorderFromSchematic);
boolean inRedArea = inArenaY && Region.isIn2DRange(to, Config.TeamRedCornerX, Config.TeamRedCornerZ, Config.SchemsizeX, Config.SchemsizeZ, Config.BorderFromSchematic);
if(inBlueArea || inRedArea) {
if(inBlueArea){
if(fightTeam == null)
reset(event, DENY_TEAM);
}else if(fightTeam != null && (
FightSystem.getFightState() != FightState.ENTERN || player.getGameMode() == GameMode.SPECTATOR)){
else if(fightTeam == Fight.getRedTeam() && player.getGameMode() == GameMode.SPECTATOR)
reset(event, DENY_ENTERN);
}else if(inRedArea){
if(fightTeam == null)
reset(event, DENY_TEAM);
else if(fightTeam == Fight.getBlueTeam() && player.getGameMode() == GameMode.SPECTATOR)
reset(event, DENY_ENTERN);
}else if(fightTeam != null && FightSystem.getFightState() != FightState.ENTERN && player.getGameMode() != GameMode.SPECTATOR)
reset(event, DENY_ENTERN);
}
}
@EventHandler