WorldEdit for Bukkit

WorldEdit for Bukkit

21M Downloads

Integrate with NeoForge permissions API

octylFractal opened this issue ยท 5 comments

commented

The Problem

NeoForge version of WorldEdit has no permission integrations.

A Solution

NeoForge has a permissions API, we should integrate with it for use with future permission mods.

Alternatives

No response

Anything Else?

Dependent on LuckPerms/LuckPerms#3936 for a working implementation.

commented

I don't see why it's dependent on the luckperms PR?

I got it to work with ftbranks, by just adding
|| PermissionsAPI.hasPermission(player, permission);
In the ForgePermissionsProvider#VanillaPermissionsProvider

It also handles the isOp check, or atleast by default if no mods is replacing the PermissionsAPI it checks for the permission level.

commented

The PR #2079 would fix this integration for 1.16.5.

For 1.18 it would most likely require a working implementation either in the LuckPerms PR or for FTBRanks to re-integrate with the PermissionAPI.

commented

I don't see why it's dependent on the luckperms PR?

I got it to work with ftbranks, by just adding

|| PermissionsAPI.hasPermission(player, permission);

In the ForgePermissionsProvider#VanillaPermissionsProvider

It also handles the isOp check, or atleast by default if no mods is replacing the PermissionsAPI it checks for the permission level.

That was mostly referring to needing a working reputable perms mod in order to properly test the implementation, we hadn't been made aware that one existed and haven't had time to look into it. If you've got a working change to WorldEdit that implements this we'd definitely appreciate a PR.

commented

I would love for LuckPerms to arrive for forge.

Currently the only "major" player is FTBRanks. It has poor documentation and is no way as good/advanced as LuckPerms, but it does the job for now.

I do, I will create a PR here in a bit.

My original intention was for 1.16, but it should work the same for 1.18.

How would I go about that, make two seperate pr's?
Is it even possible to get stuff merged into the archived 1.16 version?

commented

This is fairly infeasible with the new permissions API in Forge. It's created in a way that's fairly incompatible with the way WorldEdit handles permissions. It'd require extremely large restructuring and rethinking of permission nodes, which would be a breaking change

As there are no docs on the new Permissions API - it's also not really clear if any of those limitations can be worked around