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

Permissions

Comments in 'Plugin Development' started by PixelGuy75, Dec 8, 2014.

  1. PixelGuy75
    Offline

    PixelGuy75 Notable Member Plugin Developer

    Joined:
    Feb 9, 2014
    Posts:
    316
    Plugins:
    2
    Minecraft User:
    PixelGuy75
    Can permissions be used for events other than commands?
  2. xFlare
    Offline

    xFlare Active Member Plugin Developer

    Joined:
    Sep 28, 2014
    Posts:
    199
    Plugins:
    1
    Minecraft User:
    xFlare
    Do you mean, If player has permission this event will be allowed? If so, yes.
    Last edited: Dec 8, 2014
  3. PixelGuy75
    Offline

    PixelGuy75 Notable Member Plugin Developer

    Joined:
    Feb 9, 2014
    Posts:
    316
    Plugins:
    2
    Minecraft User:
    PixelGuy75
    Yes that's what I meant and thank you!
    EvolSoft and xFlare like this.
  4. xFlare
    Offline

    xFlare Active Member Plugin Developer

    Joined:
    Sep 28, 2014
    Posts:
    199
    Plugins:
    1
    Minecraft User:
    xFlare
    Yes, just do a permission check when the event runs. ;)

    PHP:
    if ($player->hasPermission("permission.myplugin")){
    iksaku, EvolSoft and Tethered_ like this.
  5. PixelGuy75
    Offline

    PixelGuy75 Notable Member Plugin Developer

    Joined:
    Feb 9, 2014
    Posts:
    316
    Plugins:
    2
    Minecraft User:
    PixelGuy75
    So I also have to add the permission to the plugin.yml too?
  6. xFlare
    Offline

    xFlare Active Member Plugin Developer

    Joined:
    Sep 28, 2014
    Posts:
    199
    Plugins:
    1
    Minecraft User:
    xFlare
    Yes just like you did with your AFKplugin. :)
  7. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Yes, this is the purpose of the new permission system: not limited to commands.
    PixelGuy75 and xFlare like this.
  8. xFlare
    Offline

    xFlare Active Member Plugin Developer

    Joined:
    Sep 28, 2014
    Posts:
    199
    Plugins:
    1
    Minecraft User:
    xFlare
    I think the old APi had no permission other then op and default and only for commands.

    That's why I think old API permission plugins only block commands.
    Last edited: Dec 8, 2014
    EvolSoft and RekkuzaRage like this.
  9. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    The old API doesn't have permission. The so-called permissions are just isOp and isBanned. Commands are things added by permission plugin developers.

Share This Page

Advertisement