Solved PermissionsEx default group

Discussion in 'Spigot Plugin Help' started by booksaw123, Jul 24, 2018.

  1. When a user joins they are added to group 'g1' (the default group)
    When said player ranks up they move to 'g2'

    If the player is added to a secondary group (not on the ladder, staff for example) using the command:
    Code (Text):
    /pex user <user> group add mod
    • while in 'g2': the player now is a member of 'g2' and 'mod'
    • but, while in 'g1': the player is now only a member of 'mod', this means they are no longer on the ladder so cannot move to 'g2'.

    From reading around, this problem is caused by pex saving storage by not noting down any user which is in the default group,
    • This works as if the player is not in a group, pex can assume they are in the default.
    • The issue comes when they are added to the 'mod' group, as they are not noted to be in the default group in the config, the player is no longer a member of the default group (as pex can no longer assume they are part of it)

    How could I keep the player in 'g1' while adding them to group 'mod'?

    A possible solution may be asking pex to save users details who are in the default group? not sure that is possible though.
     
    #1 booksaw123, Jul 24, 2018
    Last edited: Jul 25, 2018
  2. pex user (user) group add (group)
    Instead of
    pex user (user) group set (group)
     
  3. I'm using /pex user (user) group add (group)
    The issue is as pex does not save user details who are in the default group to save storage. This means that when the player is added to the secondary group (admin or something) as the default group is not saved, it is no longer associated to the player.

    My method works fine so long as the player is not in the default group.

    "The thing that seems to confuse people most is players are not added to the default rank per say. They are simply considered a part of it if they do not have another rank. This means if you change the default rank all players who have not had their rank explicitly set well be considered part of the new default rank. It also means when you "add" a rank to a player they are no longer considered part of default rank."
    -- macdjda38 on a bug report for this issue.

    EDIT: I do have a possible solution (would involve making a small pluign). which would check whenever a rank is added to the user and if the user is in the default rank, making sure that is remembered. But I wondered if there was a better solution
     
  4. If you can't work it out, as Pex is now Dead and outdated pretty much. It might be best to update to LuckPerms. It allows you to set default groups however you want. More info about it here.
     
    • Informative Informative x 1
  5. I'll look into it, I should have paid attention to the last Pex update date.
    Thanks
     
  6. The G1 group is the default group, so for afor any group u give, it will replace the G1 group with pex, i suggest you to set the defaukt group permissions to the Mod group too if u want to keep permissionsex
     
  7. I am in the process of switching to luckperms, thanks for the suggestion, have tested and luckperms does not include the same issue.
    - solved