From 0f558425f5731deb4015b8580a70eedd469f622c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?TheJonstone=E2=9C=93?= <93550632+TheJonstone@users.noreply.github.com> Date: Mon, 16 Jan 2023 00:34:28 +0100 Subject: [PATCH] Fix: remove unnecessary bypass permission (#2060) Fix: remove unnecessary permission --- .../main/java/com/fastasyncworldedit/core/util/WEManager.java | 2 +- .../src/main/java/com/sk89q/worldedit/EditSessionBuilder.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/WEManager.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/WEManager.java index 5ce18837c..85f4eb2d1 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/WEManager.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/util/WEManager.java @@ -97,7 +97,7 @@ public class WEManager { * @return array of allowed regions if whitelist, else of disallowed regions. */ public Region[] getMask(Player player, FaweMaskManager.MaskType type, final boolean isWhitelist) { - if (!Settings.settings().REGION_RESTRICTIONS || player.hasPermission("fawe.bypass") || player.hasPermission("fawe.bypass.regions")) { + if (!Settings.settings().REGION_RESTRICTIONS || player.hasPermission("fawe.bypass.regions")) { return new Region[]{RegionWrapper.GLOBAL()}; } Location loc = player.getLocation(); diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSessionBuilder.java b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSessionBuilder.java index 03452fea5..c235ca784 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/EditSessionBuilder.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/EditSessionBuilder.java @@ -530,7 +530,7 @@ public final class EditSessionBuilder { } } if (allowedRegions == null && Settings.settings().REGION_RESTRICTIONS) { - if (actor != null && !actor.hasPermission("fawe.bypass") && !actor.hasPermission("fawe.bypass.regions")) { + if (actor != null && !actor.hasPermission("fawe.bypass.regions")) { if (actor instanceof Player) { Player player = (Player) actor; allowedRegions = player.getAllowedRegions(); @@ -538,7 +538,7 @@ public final class EditSessionBuilder { } } if (disallowedRegions == null && Settings.settings().REGION_RESTRICTIONS && Settings.settings().REGION_RESTRICTIONS_OPTIONS.ALLOW_BLACKLISTS) { - if (actor != null && !actor.hasPermission("fawe.bypass") && !actor.hasPermission("fawe.bypass.regions")) { + if (actor != null && !actor.hasPermission("fawe.bypass.regions")) { if (actor instanceof Player) { Player player = (Player) actor; disallowedRegions = player.getDisallowedRegions();