SteamWar/FightSystem
Archiviert
13
1

Merge pull request 'Improving size of spectator space' (#148) from biggerSpectatorSpace into master

Reviewed-by: Jan9103 <maxjanssen67@gmail.com>
Dieser Commit ist enthalten in:
Lixfel 2020-05-19 08:45:59 +02:00
Commit ab4852c717

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