1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Configuring PurePerms

Discussion in 'Plugin Help' started by mmm545, May 9, 2020.

  1. mmm545

    mmm545 Baby Zombie

    Messages:
    152
    GitHub:
    mmm545
    I'm setting the groups permissions and i'm wondering how can i block the player from using (let's say) whitelist commands.
    What I'm doing is using - '*' and then add exceptions like - -pocketmine.command.whitelist
    So here is how i do it
    Code:
    Admin:
      alias: adm
      isDefault: true
      inheritance: []
      permissions:
      - '*'
      - -pocketmine.command.whitelist
      - -pocketmine.command.whitelist.add
      - -pocketmine.command.whitelist.disable
      - -pocketmine.command.whitelist.enable
      - -pocketmine.command.whitelist.reload
      - -pocketmine.command.whitelist.remove
      - -pocketmine.command.whitelist.list
      worlds: []
    isn't there any simpler way than this. and i'm doing this for iprotector commands and other ones.
    Thanks
     
  2. Diduhless

    Diduhless Baby Zombie

    Messages:
    199
    GitHub:
    Diduhless
    Why are you removing all the whitelist subcommand permissions? I'm pretty sure it would work by just removing pocketmine.command.whitelist
     
  3. mmm545

    mmm545 Baby Zombie

    Messages:
    152
    GitHub:
    mmm545
    Nope. I tried it before, didn't work
     
  4. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    I know that this doesn't really answer the question, but you probably shouldn't use the * permission (ever). Lots of plugins have default: false permissions for stuff you usually wouldn't want and you'd have to check each and every one. It's probably less work to just add the permissions the Admins should have.

    The problem is that * will go through each registered permission node on the server and give it to the player.

    For example, even if you remove permission for the parent node "pocketmine.command.whitelist", the nodes "pocketmine.command.whitelist.add", ".disable", ".enable" ... are still on the player.
     
    Diduhless likes this.
  5. mmm545

    mmm545 Baby Zombie

    Messages:
    152
    GitHub:
    mmm545
    i know that * goes into every permission node and that's why i used - -pocketmine.command.whitelist.add etc.... So is it much better to give the permissions instead of using *
    ?
     
  6. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    Usually, yes
     
  7. mmm545

    mmm545 Baby Zombie

    Messages:
    152
    GitHub:
    mmm545
    Thanks
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.