LuckPerms

LuckPerms

41.4k Downloads

Can't change existing permission without removing it first

Sir-Will opened this issue ยท 7 comments

commented

hey,

if I have a permission set to true and want to change it to false I need to remove the permission first and then add it again as false value.

commented

same problem with prefix/suffix but harder to remove since it don't show & char

commented

@dracnis you can remove all prefix/suffix with a specific priority.

commented

@Slind14 almost sure you can't the command is :
/lpb group default meta removeprefix [server] [world]
where prefix must be writted

commented

You can enter "null" instead of a prefix string.

commented

What we use and works fine:
/perm user <player> meta removeprefix <priority> null

commented

If this is the case, I think the command should be changed to make the prefix string optional, rather than require null.

commented

I've made the prefix/suffix string optional in the remove commands.

Regarding the main issue topic however, I'm not so sure on this. I know it's an ease-of-use thing, but the core internals of the plugin are designed with this behaviour.

"some.permission=true" is #almostEqual to "some.permission=false". The #setPermission and #hasPermission methods and commands follow this design. I'd rather not change this, as it breaks API backwards compatibility.