Setting Player Permissions

Discussion in 'Plugin Development' started by savagesun, Jan 21, 2013.

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

    savagesun

    I've been trying to set the permissions of a player using something along the lines of:
    Code:
    PermissionAttachment at = player.addAttachment(plugin);
     
    at.setPermission("essentials.fireball", true);
    I am indeed trying to set the permissions of another plugin, and I cannot specifically define what plugin, but I choose to use essentials in this particular example. Can I set a players permission that is given by another plugin? Do I have to define "plugin" as the plugin that gives the permission, or do I just define it as the plugin I'm setting the permission value from? I've also tried hooking into PermissionsEX, but I've had little success there either. Any input is appreciated.
     
  2. testing with permissions ex may cause your methode of permissions settings to fail, its because how permissions ex works: breaking the orginal system
     
  3. Offline

    mokomama

    I dont know the answer to you question but i do know that you have to put "this" instead of "plugin" if it is your main class. for example:
    Code:java
    1. PermissionAttachment at = player.addAttachment(this);
     
  4. Offline

    xTigerRebornx

    savagesun If you've failed to hook into PEX itself, I'd recommend trying and hooking into just Vault. Their hook may be easier, and it shouldn't fail.
    If that doesn't work, you should post the code from both attempts and the errors.
     
  5. Offline

    rsod

Thread Status:
Not open for further replies.

Share This Page