fzzyhmstrs / fconfig

Other
7 stars 3 forks source link

[Feature request] Support for Luckperms and/or other permissions plugins in the annotations #4

Closed Nindouja closed 1 month ago

Nindouja commented 2 months ago

It would be a great addition to manage permissions not only with vanilla permissions system but a more robust one as well.

We could have a @WithLuckPerms similar to @WithPerms that will assume luckperms is avaiable on the classpath and then; checkin ConfigScreenManager the given perm for that player UUID against LuckPerms.

There is mutiple ways to achieve that; this one is just one top of my head. Would you be willing to make such a change ? If you don't have time but still like the idea, I can take a deeper look at it and maybe propose submit a PR

fzzyhmstrs commented 2 months ago

Great suggestion! Integrating LuckPerms (probably via fabric-permissions-api) would require a bit of a rethink, but definitely something I'll look into at some point

Rethink would be needed because vanilla permissions are available on the client, while LuckPerms are not, and other perm mods also may not be. Might have to do something like a permissions report as part of the sync packet so the screen manager can inspect it for required permissions.

The probable layout of the annotation will be @WithCustomPerms(String[] args). It's certainly plausible that multiple permissions groups would have access to a setting.

fzzyhmstrs commented 1 month ago

This was implemented as of 0.4.x! Also integrates directly with Forge Permissions API on the (neo)forge versions