How do I read permissions from the permissions.yml file?

Discussion in 'Plugin Development' started by FrozenProgrammer, Nov 10, 2011.

Thread Status:
Not open for further replies.
  1. I have made a little plugin, but I can't work out how I can read from the permissions.yml file.
    I can only read from the plugin.yml file. Can you help me?
  2. Offline


    You should not be directly reading from any permissions file-- instead, use the standard Bukkit API, player.hasPermission("some.permission.node"). It returns true if the player has the permission, and false if the player does not. Due to features like group permissions, inherited groups, negated permissions, and wildcard permission nodes like "some.permission.*", it is much better to rely on the standard API than to try to code all this yourself. Plugins like PermissionsEx and PermissionsBukkit do all the tricky work, so that your plugin can rely on one simple call.
  3. I use it, but I can only read from the plugin.yml, it doesn't work with the global permissions.yml file. :/
  4. Offline


    That's up to the permissions plugin, you just provide the default permissions in permissions.yml
Thread Status:
Not open for further replies.

Share This Page