Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Player::addAttachment();

Comments in 'Plugin Development' started by LDX, Apr 2, 2015.

  1. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,434
    Plugins:
    14
    Can someone please give me an in-depth description of what a plugin attachment does exactly and how to use it in a permissions plugin? I've tried looking at PurePerms, but I'm having a hard time making sense of exactly how they work.
    HotFireyDeath and Angelo Vidrio like this.
  2. yungtechboy1
    Offline

    yungtechboy1 Active Member Plugin Developer

    Joined:
    Dec 25, 2014
    Posts:
    57
    Plugins:
    1
    Minecraft User:
    yungt
    Not Really Sure.
  3. HotFireyDeath
    Offline

    HotFireyDeath Notable Member Plugin Developer

    Joined:
    Mar 19, 2015
    Posts:
    328
    Plugins:
    1
    Minecraft User:
    HotFireyDeath
  4. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,434
    Plugins:
    14
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    PHP:
    $att$permissible->addAttachnent($plugin); # adds permission attachment to the permissible; I'm not sure if it gets auto removed if the plugin is disabled.
    $att->setPermission($name$boolean); # set permission $name to $boolean

    $permissible->removeAttachment($att); # run this to remove your attachment and garbage it, esp. when a player quits.
  6. Dinokiller
    Offline

    Dinokiller Notable Member

    Joined:
    Sep 22, 2013
    Posts:
    376
    Minecraft User:
    Dinokiller_
    That's not exactly an in-depth explanation, it doesn't even explain what an attachment actually does.
    LDX likes this.
  7. LDX
    Offline

    LDX Notable Member Plugin Developer

    Joined:
    Oct 2, 2013
    Posts:
    1,434
    Plugins:
    14
    Are players permissible?
  8. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,325
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Yes. Read the docs. The inheritance diagram shows that.
    LDX likes this.

Share This Page

Advertisement