-
-
Notifications
You must be signed in to change notification settings - Fork 335
Description
What feature do you want to see added?
Description
In WorldGuardFeature.java, the method isAllowed(LocalPlayer localplayer, ProtectedRegion region) currently treats the permission worldguard.region.bypass as a full override for FAWE region edit checks:
} else if (localplayer.hasPermission("worldguard.region.bypass")
|| localplayer.hasPermission("worldguard.region.bypass."
+ localplayer.getWorld().getName().toLowerCase(Locale.ROOT))) {
return true;
}Because of this, any player with worldguard.region.bypass can use FAWE editing operations such as //set in any WorldGuard region, not only in their own region.
Problem
This is problematic for servers where staff or trusted players should have:
- full WorldGuard bypass for normal gameplay actions such as breaking/placing blocks anywhere
- but FAWE region editing access only inside regions they own or are allowed to edit
Right now, worldguard.region.bypass also bypasses FAWE's region ownership/member restrictions, which makes it impossible to separate:
- general WorldGuard bypass
- from FAWE region-edit bypass
Expected behavior
It should be possible to configure FAWE so that worldguard.region.bypass does not automatically grant FAWE editing access in all WorldGuard regions.
A player should be able to:
- break/place anywhere because of worldguard.region.bypass
- but still use //set, //replace, etc. only in their own region unless they have a separate explicit FAWE bypass permission.
Are there any alternatives?
A dedicated permission node for FAWE WorldGuard bypass, separate from worldguard.region.bypass.
For example: fawe.worldguard.bypass
So the logic would only allow global FAWE region editing if that explicit FAWE permission is present.
Anything else?
Why this matters
Many servers use worldguard.region.bypass for moderation, admin building, or custom gameplay roles.
But that does not always mean those users should be able to run mass-edit operations inside every protected region on the server.
Separating these two behaviors would make FAWE much safer and more flexible in production environments.
Relevant code
File: worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/WorldGuardFeature.java
Method: isAllowed(LocalPlayer localplayer, ProtectedRegion region)
Summary
Please add a way to prevent worldguard.region.bypass from automatically allowing FAWE edits in all WorldGuard regions, either through:
- a config option
- or a separate FAWE-specific bypass permission