SteamWar/FightSystem
Archiviert
13
1

Improving size of spectator space #148

Manuell gemergt
Lixfel hat 1 Commits von biggerSpectatorSpace nach master 2020-05-19 08:46:00 +02:00 zusammengeführt

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 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); boolean inRedArea = inArenaY && Region.isIn2DRange(to, Config.TeamRedCornerX, Config.TeamRedCornerZ, Config.SchemsizeX, Config.SchemsizeZ, Config.BorderFromSchematic);
if(inBlueArea || inRedArea) { if(inBlueArea){
if(fightTeam == null) if(fightTeam == null)
reset(event, DENY_TEAM); reset(event, DENY_TEAM);
}else if(fightTeam != null && ( else if(fightTeam == Fight.getRedTeam() && player.getGameMode() == GameMode.SPECTATOR)
FightSystem.getFightState() != FightState.ENTERN || 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); reset(event, DENY_ENTERN);
}
} }
@EventHandler @EventHandler