MyWarp

MyWarp

220k Downloads

Limits don't work

TheZenKitteh opened this issue ยท 3 comments

commented

I've been trying to figure this out for a few hours now and I'm done. I can't figure it out.

The problem: I'm trying to set warp limits per user group (using pex) but all groups have no apparent limits. I've tried up to five warps though. I'm sure it must be a configuration issue.

My limits section of the mywarp config:
https://pastebin.com/zCTNKQ6a

I'm not pasting my whole permissions file as it's a bit too large for my liking but i have:
- mywarp.limit.vip (vip example) in every permission field of every group with the ending changed to match the limits i want.

The member group should be limited to 1, but they can create over four (I've tested to five) without issue. What could I possibly be missing?

commented

There might be an issue due to permission inheritance. To check this I need your PEX permission file (groups only). Could you try to post it on pastbin (you can remove every permission that does not start with mywarp)?

commented

This indeed seems like a configuration issue: Your limits will not work as expected due to the inheritance of your permission groups.

For example, the group member inherits all permissions from guest. member has the permission for the limit member, but due to this inheritance, also for the limit guest.
Obviously, a player can only be affected by a single limit at a time. Therefore, members of the member group, who have permissions for two limits, will only be affected by the limit that comes lexicographically (alphabetically) first; here the limit guest. This is not what you want.

You can easily fix this by naming your limits taking this lexicographical ordering into account, e.g. by prefixing the names with single character.

I have done so here. I have also fixed a few things:

  • The limit guest was removed: guests cannot create warps, so they do not need a custom limit.
  • member and plus were also removed: For both, the default limit can be used. The default limit affects everybody who does not have the permission for any of the other configured limits; simply removed all my warp.limit.XYZ permissions from the groups member and plus.

If you test, please alter the permissions in PEX's group file accordingly.

commented

I just made a paste with the groups in question and removed everything but the mywarp permissions to make it easier to read

https://pastebin.com/APsPmutJ