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

Permissions

Discussion in 'Facepalm' started by LucGamesDE, Apr 29, 2017.

  1. LucGamesDE

    LucGamesDE Baby Zombie

    Messages:
    170
    How can I add the permission "x.perm" using addAttachment to a player? And how can I remove it?
     
  2. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    facepalm section...
    add this to your main class to add the permission
    PHP:
    /** PermissionAttachment $permissionAttachment */
    $permissionAttachment $player->addAttachment($this"x.perm"true);
    This is to remove the attachment:
    PHP:
    /** PermissionAttachment $permissionAttachment */
    $player->removeAttachment($permissionAttachment);
     
  3. LucGamesDE

    LucGamesDE Baby Zombie

    Messages:
    170
    And how can I remove every permission?

    *And how can I list them?
     
  4. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
    Might I recommend looking at the source code in PurePerms?
     
  5. LucGamesDE

    LucGamesDE Baby Zombie

    Messages:
    170
    I've already took a look at it.
     
  6. LucGamesDE

    LucGamesDE Baby Zombie

    Messages:
    170
    This isn't working if I use the before declared permission. Or do I need to define it desperately? How?
     
  7. jasonwynn10

    jasonwynn10 Moderator Poggit Reviewer

    Messages:
    1,489
    GitHub:
    jasonwynn10
  8. 64FF00

    64FF00 Shog Chips

    Messages:
    0
    ^ This one is a lot stable and better than PurePerms, worth checking it out
     
  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.