So I started to work on changing how I handle default permissions in GP and came across a stumbling block. Currently, whenever a user uses the /cf command, the permission/value/context get stored in the global subject(defaults).
Here is how it would show up in PEX if a user typed the command
/cf entity-spawn pixelmon:trader false
“contexts”: {
“gp_claim”: “e7ae9257-cea4-455e-adec-2c42d2d19269”
},
“permissions”: {
“griefprevention.claim.flag.entity-spawn.pixelmon.trader”: -1
}
If I store this in a config, it could get messy fast. I also didn’t want to have defaults in config and everything else stored in perms. I would rather all permissions be stored in one place if possible.
Here are 2 alternatives
-
As I mentioned before was for LuckPerms to isolate any defaults set by a plugin until Sponge adds support for it in API. This feature could be flipped on in LuckPerms config. For example, you could have a config option “isolate-plugin-defaults” which could be a list that accepts plugin ids. Any plugin id specified in this config option would store all default permissions containing the plugin id in an isolated location to avoid bloating the global default subject.
-
GP adds a config option to specify the default group to use then reference that instead of the default subject. So if a user typed /cf command, I would use the default group set in GP’s config and set it in permissions. The only issue with this option is it would assume the user followed directions and made sure GP’s default group was inherited properly. Option 1 requires no user intervention.