I was playing around with the permission service (implemented my own, mainly to see if it’s difficult). When I read the docs it also talked about the contextual Service and what it does. I sounded pretty useful, so I wanted to try out the Sponge implementation first, to see how it works. It didn’t do anything.
After some digging in SpongeCommon I found, that Sponge does provide their own context calculator (which creates Contexts for the world, dimension, etc.), they even try to register it with the permission service, but the method registerContextCalculator (in the SpongePermissionService) seems to be empty, also the getActiveContexts method only returns the global_context.
As far as I could see it it’s also not added via mixin.
Now, why is most of the service implemented, yet the crucial part is left out?
Tanks, but I’m not looking for a way to implement this (that should be relatively straight forward), I’m just wandering if anyone knows why this is build into the sponge permission system, but disabled.
Ok, I was just wandering, since they explain the functionality in the docs without mentioning that it isn’t supported (but maybe I just missed that) and they aren’t giving a hint to that in the log (or throwing an UnsupportedOperationException or similar).
Just leaving the method empty makes it look a little unprofessional/lazy and harder to debug for someone who is not going through the source files.