Giving Permissions

Discussion in 'Plugin Development' started by locococo3616, Oct 20, 2013.

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

    locococo3616

    Just a quick question: how do you give permission nodes to players?
     
  2. Offline

    Briggybros

    It depends, you'll probably want to use vault.
     
  3. Offline

    PolarCraft

    locococo3616 if you want to use permission nodes i would do.
    Code:java
    1. if (sender.hasPermission("example.test")) {

    But if you want to add permission nodes for players use groupmanager or permissionsex for testing of your plugin.

    Briggybros How would vault help with permission nodes?
     
  4. Offline

    Briggybros

    PolarCraft To my knowledge, vault is used for hooks, permissions and economy. I'm pretty sure it has a function to add permission nodes. Using vault the plugin won't have to depend on a certain permissions plugin, as vault will manage them all.

    EDIT: like this:
    Code:java
    1. vaultPermissionManager.playerAdd(player, "permission.node");
     
  5. Offline

    Sagacious_Zed Bukkit Docs

    The Bukkit API calls for adding permissions belong to the Permissible interface.
     
  6. Offline

    PolarCraft

    Briggybros and still why would you use vault when you can just add the permission node to any plugin.. I have used all of my nodes on bpermissions groupmanager and permissionsex.
     
  7. Offline

    locococo3616

    Sagacious_Zed I'm pretty new with Bukkit and coding in general, so can you just show how to give permissions?

    EDIT: Nevermind, figured it out.
     
  8. Offline

    Briggybros

    PolarCraft Because it adds simplicity. If the plugin is going to be distributed publicly, there is no way of knowing which permissions plugin the end user will be using. Using vault will make the plugin compatible with most major permissions, economy and chat plugins, instead of having to have a dependant method for each. Seeing as most servers will already be running vault (due to its popularity as this bridge), then it probably wont mean the end user wont need to have vault for just the one plugin.

     
Thread Status:
Not open for further replies.

Share This Page