Improving size of spectator space #148
@ -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
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren