EngineHub / EngineHub/WorldGuard

Use LuckPerms contexts for Region Management where Applicable

Open
#2,301 5 comments 0 reactions 0 assignees View on GitHub
status:pending type:feature-request
Dominant language
Java
Stars
938
Forks
671
PR merge metrics
No merged PRs in 30d

Description

### The Problem

On our server, we have two worlds:
- A citybuild world where people create claims, build bases and have elevated flag-related permissions to set flags like block-trampling, mob-griefing etc
- An SMP world where people can still claim, but claims are limited to just block damage limitation

Our permission manager, LuckPerms, allows me to set permissions on a per-world basis. Thus, I can use contexts to allow people access to certain flags in the citybuild world, but not in the smp world.

Considering that region flags can be set across dimensions, using the `-w` option, this behaviour will lead to potential to evade the permission plugin.

### A Solution

WorldGuard should, if present, use LuckPerms and its Contexts in respective to the `-w` option to ensure proper permission checks.

### Alternatives

It may be possible to avoid such evasion cases with further limitation of subcommands, like the flag command, but that will also limit options for the users whatsoever.

### Anything Else?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by tracing WorldGuard’s region-management permission checks for commands using the `-w` option, then review the LuckPerms Contexts API and how its world context is evaluated. Done means permissions granted in one world cannot authorize the corresponding region flag operation in another, while existing same-world behavior remains intact.

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
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.