LuckPerms

LuckPerms

41.4k Downloads

multiple points on a track issue with promote command

frizzbee30 opened this issue ยท 6 comments

commented

Hi, I've tested this a few times and tweaked the config, but seem to be getting an issue with the promote function.

I'm using lp user frizzbee30 promote survivalrank global "survival map"

To test I've been deleting my user file, firing up the test server and joining.

Obviously with the inheritance system this isn't a problem for permissions, but is killing the promote option.

As stated previously we run multi world, so i have set up the config with the base group for each world on join

I've stopped changing the primary group as this seems to randomly 'add' an additional prison parent when the server is left and re joined for some reason.

Hence I am just checking for base groups and have only tested survival map so far (in final stages before dropping into live.

My config is in the listed pastebin, but I have included sections of the group user files before and after running promote.

If I start the server (deleted user file) I can use the promote no problem in survival, up until whatever rank is needed.

If I leave the server and rejoin, it immediately breaks the promote track and the duplicate parents appear as below.

running the promote command then produces the multiple points warning

I was assuming that it would identify that a parent was inherited and thus available, but it seems that the parent must be listed directly in the user file?

Is there another way to assign the join groups at all in each world? I suspect this probably wouldn't be an issue in non multiverse environments.

spigot 1.12.2
ver 4.0.82

config https://pastebin.com/AHqpqn4v

Thanks

survival:
if:
lacks: <global-Survival Map/group.traveler>
give:
- global-Survival Map/group.traveler

new user file after join

parents:

  • survivor:
    value: true
    world: vanilla
  • traveler:
    value: true
    world: survival map_the_end
  • traveler:
    value: true
    world: survival map
  • islander:
    value: true
    world: skyworld
  • e4:
    value: true
    world: prison
  • citizen:
    value: true
    world: plotworld

promote (x3) run

  • survivor:
    value: true
    world: vanilla
  • traveler:
    value: true
    world: survival map_the_end
  • bronze:
    value: true
    world: survival map
  • islander:
    value: true
    world: skyworld
  • e4:
    value: true
    world: prison
  • citizen:
    value: true
    world: plotworld

leave/join no command run (command then fails due to duplicate entries)

  • survivor:
    value: true
    world: vanilla
  • traveler:
    value: true
    world: survival map_the_end
  • bronze:
    value: true
    world: survival map
    - traveler:
    value: true
    world: survival map
  • islander:
    value: true
    world: skyworld
  • e4:
    value: true
    world: prison
  • citizen:
    value: true
    world: plotworld
commented

Sorry - you're going to need to be more specific about your question.

I can't follow what you've said above.

commented

Hi, the using the config excerpt above (and attached) is the only way I can see to assign the default ranks (parents) that we need in each world as the base rank.

Once joined, I can then be promoted up the ladder, eg to ultimate vip with no problem and traveler is removed.

However, if I disconnect, then log back in, not only do I have the ultimate vip group, but the default traveler group (removed previously by being promoted) is reassigned.

If I then want to use the promote option again it is broken for good, as it seems to see the two parents and gets confused which should be used to promote, ie traveler or ultimate.

This will be an issue for every world group that has a rank ladder and needs membership checking on join.. If the command looked at parents assigned by weight, and picked the highest weighting, then that may be one way to do it.

However, after looking at it for a while I can't find an easy way for it to both check if a user is on a promotion track, ie a member for the default group for a world, and also not add them to a group if they are already further down the weighting/promotion track, using the config I can work out

I hope that helps explain it a bit better :)

Thanks

commented

Only give the default group if none of the groups on the ladder are set :)

Here some relevant comments from the file

# The "has" and "lacks" conditions below support standard boolean logic, using the 'and' & 'or'
# characters used in Java.
# e.g. "(some.other.permission | some.permission.other) & some.thing.else" == a user has
# 'some.other.permission', or 'some.permission.other', and they also have 'some.thing.else'

#  rule2:
#    if:
#      lacks: <skyblock/group.sb_level1> & <skyblock/group.sb_level2> & <skyblock/group.sb_level3>
#    give:
#      - skyblock/group.sb_level1
commented

Thanks, that's great. I hadn't quite grasped how it would parse, and obviously overlooked the 'or' bit :)

commented

Glad I could help you :)
Even though I think you would need the 'and' (&) as you only want to assign the group if he lacks all of the groups. But maybe I'm wrong with that, it get's really confusing if one is using to much boolean logic^^
And I haven't used this feature much :)

commented

Thanks again, using the '&' does seem to have worked in a quick test, the traveler group is no longer added if the user has the test rank, or traveler rank already :) ( I would have thought it would be all, or the two test groups, but seems to be either one!)