IntellectualSites / IntellectualSites/FastAsyncWorldEdit

Add a way to ignore WorldGuard bypass permission in FAWE region edit checks

Open
#3,486 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement
Dominant language
Java
Stars
806
Forks
394
Avg merge
22h 19m
Merged PRs (30d)
14

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/regions/WorldGuardFeature.java and inspect isAllowed(LocalPlayer localplayer, ProtectedRegion region), especially the worldguard.region.bypass checks. Decide whether the separation uses a configuration option or a dedicated permission such as fawe.worldguard.bypass, and verify that normal WorldGuard bypass remains separate from FAWE editing access.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
authorization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.