From dd8dddb3a82375644d110ebdf102ef84e710e649 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Mon, 11 Jan 2021 19:43:06 +0100 Subject: [PATCH] Fixed Entern befor Entern --- .../de/steamwar/fightsystem/listener/PlayerMoveListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/listener/PlayerMoveListener.java b/FightSystem_Main/src/de/steamwar/fightsystem/listener/PlayerMoveListener.java index 1772eb9..fe95bce 100644 --- a/FightSystem_Main/src/de/steamwar/fightsystem/listener/PlayerMoveListener.java +++ b/FightSystem_Main/src/de/steamwar/fightsystem/listener/PlayerMoveListener.java @@ -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