From 68f4da0f4fa70a855d7a1f7e4bfdea681093814b Mon Sep 17 00:00:00 2001 From: Lixfel Date: Wed, 31 Mar 2021 21:50:45 +0200 Subject: [PATCH] Fix team area Signed-off-by: Lixfel --- .../src/de/steamwar/fightsystem/listener/TeamArea.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/listener/TeamArea.java b/FightSystem_Main/src/de/steamwar/fightsystem/listener/TeamArea.java index 3f8bb97..b397645 100644 --- a/FightSystem_Main/src/de/steamwar/fightsystem/listener/TeamArea.java +++ b/FightSystem_Main/src/de/steamwar/fightsystem/listener/TeamArea.java @@ -73,8 +73,10 @@ public class TeamArea implements Listener { else return; // Is allowed in area checkInInnerArea(event.getPlayer(), to, Fight.getRedTeam()); - }else if(team != null && player.getGameMode() != GameMode.SPECTATOR && !team.canPlayerEntern(player)) - reset(event, DENY_ENTERN); + }else{ + if(team != null && player.getGameMode() != GameMode.SPECTATOR && !team.canPlayerEntern(player) && !team.getExtendRegion().in2dRegion(to)) + reset(event, DENY_ENTERN); + } } private void checkInInnerArea(Player player, Location to, FightTeam team){