LuckPerms

LuckPerms

41.4k Downloads

Show a warning when multiple groups have the same weight

NEZNAMY opened this issue ยท 1 comments

commented

Description

Sadly luckperms doesn't really have any "punishment" for not configuring weights and having wrong primary group of users. However, this is a problem for plugins that take primary group from LP and further use it, as wrong group is picked and plugin does not work as expected. A good example would be my own plugin, which takes primary group of users and then sorts players based on it. By now we have had hundreds of users asking for help why is sorting not working, with the most frequent cause by far being LP weights not configured and default group being set as primary due to alphabetical pick logic (default < owner).

Proposed behaviour

When creating a group, a message could be displayed saying weight should be configured.
Console warn on plugin startup would be best.
Another option could be in-game warn on join for OPs?

commented

I'm not sure a warning / error message is the best fix.

It is perfectly valid to have a setup without any group weights - primary groups are a concept which I don't really like to encourage (this is partly why they are somewhat hidden away and minimalised in LuckPerms)

If it is causing you a problem in your own plugin, perhaps a good solution would be to detect it (using the LuckPerms API, or otherwise) at that end, and print an error message accordingly.