From 3bbee581976ab531f8c325ad8f3c018427407984 Mon Sep 17 00:00:00 2001 From: isokissa3 Date: Wed, 18 Apr 2018 18:42:27 +0300 Subject: [PATCH] Fixed bypass permission is not supported on __global__ region --- pom.xml | 2 +- .../worldguardextraflags/wg/WorldGuardUtils.java | 4 ++++ src/main/resources/plugin.yml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 919ed4e..fcb36da 100644 --- a/pom.xml +++ b/pom.xml @@ -73,5 +73,5 @@ provided - 3.0.0 + 3.0.2 \ No newline at end of file diff --git a/src/main/java/net/goldtreeservers/worldguardextraflags/wg/WorldGuardUtils.java b/src/main/java/net/goldtreeservers/worldguardextraflags/wg/WorldGuardUtils.java index cbfca5f..8a4374b 100644 --- a/src/main/java/net/goldtreeservers/worldguardextraflags/wg/WorldGuardUtils.java +++ b/src/main/java/net/goldtreeservers/worldguardextraflags/wg/WorldGuardUtils.java @@ -67,6 +67,10 @@ public class WorldGuardUtils NormativeOrders.sort(checkForRegions); ProtectedRegion global = WorldGuardExtraFlagsPlugin.getWorldGuardPlugin().getRegionManager(world).getRegion(ProtectedRegion.GLOBAL_REGION); + if (WorldGuardUtils.hasBypass(player, world, global, flag)) //Lets do like this for now to reduce dublicated code + { + global = null; + } return new FlagValueCalculator(checkForRegions, global); } diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 4ef2767..8aa2194 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,5 +1,5 @@ name: WorldGuardExtraFlags -version: 3.0.1 +version: 3.0.2 description: Adds more flags to WorldGuard to help manage your server easily! author: isokissa3 website: https://goldtreevers.net