Open LazyDope opened 1 year ago
Could you clarify which Fabric permissions API you're referring to? The only one I can find is https://github.com/lucko/fabric-permissions-api/ and it doesn't appear to actually be part of the Fabric API, but a separate API that someone has made.
That would be the one, the creator is the same as LuckPerms, which is one of the more used permission managers, but is also commonly supported with other permission managers.
Unfortunately the API doesn't seem to be designed in such a way where there are default implementations, which makes it a little harder to integrate. I'll look into including it when I start work on the 1.20 rewrite multiplatform project.
What do you mean by default implementations? All mods need to provide their own permission nodes as that is how the permissions are differentiated from one another if that's what you're referring to, besides that, the usage page describes how to include the API itself, so that you can check for these permissions.
If you check the issues page, you can see the struggles that some people have had with it. There doesn't appear to be a solid way to depend on it, and some people have had issues with luckperms not providing the correct API.
I see what you mean, it seems that the API has been on v0.2 for some time now while continuing to make incremental changes. It seems that they have recently bumped the version to v0.3 so once that is released it could provide more consistency, however I understand your concern.
Additionally, while using the API is fine, it becomes problematic if there is no actual implementation (i.e., luckperms, or whatever) installed. So it needs to be coded to have a fall-back system that checks to see if the API is available or not -- which means it's not just a matter of replacing the "check permissions" part of the Brigadier/command code with this API.
I would like to note that the API includes a function that falls back to vanilla operator levels, however if you're planning to not bundle the mod with the API then I could see that not working, but that has issues of its own.
I would like to be able to able to provide access to the commands that allow for adding custom loot chests to people using the fabric permissions api with LuckPerms, however only operator is able to give access currently, and this does not work well across multiple servers.
It would be much easier to work with lootr if it supported the features of the Fabric Permissions API for these commands that usually require operator levels.
Hope to hear updates soon!