ZHorse

ZHorse

10.4k Downloads

Permissions inheritance problem

seppethehero opened this issue ยท 3 comments

commented

Hello,
I'm likin the plugin really much!
There is just one problem in my server with it:

I created the groups for every rank in the server and added the custom permissions tot the permisisons file.
I'm gonna explain this as easily as possible:
Rank A = can claim 1 horse
Rank B = can claim 2 horses

Group B has the inheritance of group A so it has the permission from group A in it's permissions as well as the permission from group B.
So in my server People with the rank: Group B can only claim 1 horse :(
Is there a way you can add a priority system of some kind?

Thanks in advance!

This is a group from the config, I added the zh.group.novice to the permissions file.
Example:
Novice:
color: "&2"
color-bypass: false
claims-limit: 2
permission: zh.group.novice

commented

Hi,

Please take note that the permissions defined in Groups.<group>.permission are to be defined and used only if you don't want the name of the ZHorse group to match the name of a permission group. More infos on that on the wiki : https://github.com/Zedd7/ZHorse/wiki/Tips-&-tricks#unexpected-limit-reached-message

With that in mind, I suggest that you delete the permission lines from ZHorse's config and stick to the group matching technique, like this :

Groups:
  A:
    color: <dark_aqua>
    color-bypass: false
    claims-limit: 1
  B:
    color: <dark_aqua>
    color-bypass: false
    claims-limit: 2

As long as there exist a permission group A and B in your server, it should work fine.

If for some reason you want to use fake group names, try sorting the ZHorse's groups in descending claims-limit order. So B before A, etc.

If it doesn't work, please fill the issue template

commented

Removing the permissions worked like a charm ;)
Thank you for the fast response!

We are very happy with your plugin and will be using it for as long as it gets updated!

commented

Good to hear :)
A new update will come with MC 1.13 but afterwards the development will be put on hold. However ZHorse's code was made with future compatibility in mind so new MC updates shouldn't break it.