Solved Give All Permissions (*)

Discussion in 'Plugin Development' started by ThePixelPony, Mar 28, 2014.

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


    Hello. I am making a permissions plugin and all has gone well so far, but I have absolutely no idea about how to implement stars like other permission plugins. For example, if someone listed griefprevention.* as a permission, I'd like to give all permissions that start with "griefprevention.".

    My code so far:
    1. PermissionAttachment attach = player.addAttachment(this);
    2. attach.setPermission("", true);
  2. Offline


    ThePixelPony I believe that needs to be set as a wild card, in the .yml. If I may direct you to: this will show you how to use the permission value in the YAML. An example:

  3. Offline


    The * permissions are meant to be setup by the individual plugin (they can combine permissions nodes in their plugin.yml). Alternativly server owners can setup those kind of permission aliases and bundles themselves via bukkit's permission.yml

    An ultimative "star permission" (all permissions granted) would be similar to the already existing "operator" system.

    If you are looking for automatically creating such star permissions for other plugins then also keep in mind that there are permissions out there which have negative effects for the player, and which are normally marked as 'default: false' then in the plugin.yml.

    I think the way permissionsex for example has implemented their star permission is by hooking into craftbukkits internals and intercepting the permission checks there (I guess).
  4. Offline


    Oh, I understand now. So my permission plugin doesn't have to do anything for the * nodes, but the plugins themselves.
Thread Status:
Not open for further replies.

Share This Page