From 95ecb5609d731b2990147e5392a3eea2de496e92 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Fri, 5 Nov 2021 19:04:15 +0000 Subject: [PATCH] Check for worldguard bypass permissions --- .../fastasyncworldedit/bukkit/regions/WorldGuardFeature.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/WorldGuardFeature.java b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/WorldGuardFeature.java index c89840407..bab2b3b91 100644 --- a/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/WorldGuardFeature.java +++ b/worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/WorldGuardFeature.java @@ -140,6 +140,10 @@ public class WorldGuardFeature extends BukkitMaskManager implements Listener { return true; } else if (region.isOwner("*")) { return true; + } else if (localplayer.hasPermission("worldguard.region.bypass") + || localplayer.hasPermission("worldguard.region.bypass." + + localplayer.getWorld().getName().toLowerCase(Locale.ROOT))) { + return true; } //Check if the player has the FAWE permission for editing in WG regions as member, then checking member status.