LuckPerms

LuckPerms

41.4k Downloads

Question: Am I using the weights correctly?

k0nker opened this issue ยท 1 comments

commented

I have ranks that inherit permissions from other ranks. At the lowest level there is a group that does a blanket remove of some permissions, some things that are set to true by default by the specific plugin they belong to so I have to set them as false.

I have created a group which does this with a weight of 1. It is a parent group to the lowest rank. The problem I am having is that the ranks above it that have groups that turn these permissions back on with a weight of 3 are not actually turning them on. The group with a weight of 1 is keeping them turned off.

Here's an example.

DummyRank1
2018-05-16 17_45_30-window

DummyRank2
2018-05-16 17_45_58-window

DummyGroup1
2018-05-16 17_45_51-window

DummyGroup2
2018-05-16 17_46_04-window

Even though DummyGroup1 is weighted to lower than DummyGroup2, being rank2 still returns false for permission.killeverything.

If I remove the weight from the rank group, the issue still pops up, except if I use this on the lower weighted group: permission.* false and this on the higher weighted group: permission.killeverything true it seems to work. But specifying a permission is a little iffy on putting it back to true. Sometimes it does it, sometimes it does not do it. Case in point with essentials.warp.

Adding essentials.warp false to the lower weight but essentials.warp true to the higher weight does not reenable it.

Am I not using this correctly?

commented

Which groups is the user added to?

Weights are checked in order of inheritance, meaning if a user has DummyRank1 and DummyRank2, the order those will be inherited in is undefined.

If DummyRank1 is first, the order would be:

  • DummyRank1
    • DummyGroup1
  • DummyRank2
    • DummyGroup2
    • DummyGroup1 (ignored a second time)

If DummyRank2 is first, the order would be:

  • DummyRank2
    • DummyGroup2
    • DummyGroup1
  • DummyRank1
    • DummyGroup1 (ignored a second time)

In the first example, permission.killeverything would be false (DummyGroup1 is inherited first), but would be true in the second example, as DummyGroup2 is inherited first.

Hopefully that makes sense