Permissions for a plugin?

Discussion in 'Plugin Development' started by randomman159, Oct 17, 2011.

Thread Status:
Not open for further replies.
  1. Offline


    So i'm a bit confused, how can i create permissions for my plugin? Yeah, that's basically the question. I have a plugin, now i was wondering what i do to allow it to work with permissions... :p

    thanks for any help.
  2. Offline


    For bukkit permissions you just need an if statement:
    2. if (player.hasPermission("node.node")) {
    3. do something;
    4. }

    Can be used in a command, or an event.
  3. Offline

    Don Redhorse

  4. Offline


    so i have this code:

    if (player.hasPermission("MyNode.Node"))
    player.sendMessage(ChatColor.RED + "You do not have permission to do this");

    and i am the admin permission class, which has been given the permission '*'. Why is it that it would still say i don't have permission? NOTE: im using permissionsEX
  5. Offline


    Because that code is for bukkitPerms, you need different code for pex, go to the pex thread and read how to use it.
  6. Offline


    ahh thanks, looking at it now :)
    EDIT: Erm, i can't find details... any help on where to look?
  7. Offline


  8. Offline


    PEX supports bukkit perms. Have you declared the permission in your plugin.yml file?

    Though, I'm not sure if PEX supports the * permission for bukkit perms. You might need to specifically include your permission in your permissions config.
Thread Status:
Not open for further replies.

Share This Page