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

Perms

Discussion in 'Facepalm' started by #A6543, Jun 25, 2017.

  1. #A6543

    #A6543 Zombie

    Messages:
    267
    Ist there a way to get all the permissions of all plugins? I want to list them and I have no idea how to start. Please write if u need more information
     
  2. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    Permissions of all plugins, or all permissions on the server, including those not registered by plugins?
     
  3. #A6543

    #A6543 Zombie

    Messages:
    267
    All permissions
     
  4. BEcraft

    BEcraft Slime

    Messages:
    79
    GitHub:
    BEcraft
    You can use
    PHP:
    $this->getServer()->getPluginManager()->getPermissions();
     
  5. #A6543

    #A6543 Zombie

    Messages:
    267
    But this only displays all's default perms
     
  6. MCMarsBoyee

    MCMarsBoyee Spider Jockey

    Messages:
    30
    GitHub:
    mcmarsboyee
    Just retrieve a list of the permissions from each of the plugins' README.md and/or wikis on Github, and then make a text document with those listed. (every time you get a plugin) This is what I do and it works perfectly, unless you forget, then you can just retrieve the plugin permissions you forget.
     
  7. #A6543

    #A6543 Zombie

    Messages:
    267
    That's not what I want to do. I don't want to add all permissions manually
     
  8. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    What else do you want to do?
    Remember that permissions may not yet be registered if your plugin loads earlier than other plugins.
     
  9. #A6543

    #A6543 Zombie

    Messages:
    267
    This only displays the default perms. How can I register the permissions in my plugin to have them in this list?
     
  10. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    When do you call getPermissions()?
     
  11. #A6543

    #A6543 Zombie

    Messages:
    267
    Yes
     
  12. Sandertv

    Sandertv Zombie Pigman Poggit Reviewer

    Messages:
    786
    GitHub:
    Sandertv
    When
     
  13. #A6543

    #A6543 Zombie

    Messages:
    267
    Ou. I do it onCommand
     
  14. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    Plugins are enabled after every plugin is loaded.
    Something like this:
    Code:
    Loaded plugin A
    Loaded plugin B
    Loaded plugin C
    Enabled plugin A
    Enabled plugin B
    Enabled plugin C
    
    So if you get all permissions during Plugin->onEnable(), you will get permissions of all the plugins.
     
  15. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    He said he is getting the permissions on command.
     
    #A6543 likes this.
  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.