Where is the Permissions API

Discussion in 'Plugin Development' started by llehctim4, Nov 30, 2011.

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

    llehctim4

    Hi, I am just starting out making plugins and I have got the source from a magic plugin praecantatio and it comes up with errors about the permissions API not found. I have done alot of searching and can't find the permissions API anywhere, can someone provide a link and also a link to any other bukkit-related API's?
     
  2. You shouldn't really be using the Permissions API since it's dead. use Player.hasPermission("perm.node") instead, it's a part of SuperPerms.
     
  3. Offline

    llehctim4

    Ok, thanks. Thats why I couldnt find it. Its annoying tho cuz theres loads of errors because of it. Do you know of a guide to using permissions in a plugin?
     
  4. Offline

    Drakonix

    Code:JAVA
    1. if(Player.hasPermissions("perm.node"){
    2. //Your method
    3. }
     
  5. Offline

    bleachisback

  6. Offline

    bleachisback

    Yes, but the point is, you didn't tell him that. If you don't register them, they don't work. lol
     
  7. Offline

    llehctim4

    Thanks guys! So how do I get rid of those errors, heres a sample of the code:
    IMPORTING ERRORS:
    Code:
    import [COLOR=rgb(255, 0, 0)]com.nijiko[/COLOR].permissions.PermissionHandler;
    import [COLOR=rgb(255, 0, 0)]com.nijikokun[/COLOR].bukkit.Permissions.Permissions;
    AND OTHER CODE:
    Code:
            [COLOR=rgb(255, 0, 0)]permissions[/COLOR] = [COLOR=rgb(255, 0, 0)]((Permissions) permissionsPlugin)[COLOR=rgb(0, 0, 0)].[/COLOR][/COLOR]getHandler();
            usePermissions = true;
            log.info("[Praecantatio] Using " + [COLOR=rgb(255, 0, 0)]((Permissions)permissionsPlugin)[/COLOR].getDescription().getFullName());
        }
     
  8. Offline

    bleachisback

    You just used Permissions Legacy, look at the link i posted
     
  9. Offline

    llehctim4

    Im confused. So was that link you posted for old or new perms? And I'm guessing I need to use the old perms API to get rid of those errors.
     
  10. No you should use the new one.
     
  11. Offline

    llehctim4

    So those errors don't matter?
     
  12. Offline

    dakoslug

    Can you guys name me all the SUPERPERM plugins?
     
  13. Offline

    llehctim4

    There might be more but the ones I know are: PermissionsEx, PermissionsBukkit, and bPermissions are the main ones I think but there is also Essentials Gropu Manager. Personally I use PermissionsEx, It is good and the '*' node is useful, and also you can use a mySql (I think) database as well as the normal YML files (what I use) but I think you can add your own too. I havent really tried out the others though. Hope I helped.
     
    dakoslug likes this.
  14. Offline

    dakoslug

    Thanks, it looks like the main ones are superperms.
     
Thread Status:
Not open for further replies.

Share This Page