[REQ] permissions-easy plugins

Discussion in 'Archived: Plugin Requests' started by dark2222, Feb 3, 2012.

  1. Offline

    dark2222

    Plugin category: [admin]

    Suggested name: [permissions-easy]

    A bit about me: i cant make plugins selv so i ask because i think i have somse good ideas and im from Danmark so sorry for my bad english

    What I want: a permissions plugin they detects the plugins on the server and find the permissions notes for all the plugins they are on the server then a windo on 800 x 600 (maby bigger you choice) and in that window can you add permissions to a group just typing the command in a group (eg you will give the kick to a group just scroll down find the group click on add command and write the command down and then click ok and then you just need to reload the server and done you have add a command just saying the command) they shull be an add group and remove group and remove command they shull be and "able to place and use items" button and list but not least they shull be a add multi commands (eg i want to add kick and ban to admins then i click on add multi command and write /kick /ban and then it the add commands button)

    Ideas for commands: /addcommand {group} (player) [command]
    /removecommand {group} (player) [command]
    /addcommandgroup {group} [command]
    /removecommandgroup {group} [command]
    /addcommandplayer (player) [command]
    /removecommandplayer (player) [command]
    /setgroup (player) {group}
    Ideas for permissions: permissionseasy.allow.commands
    permissionseasy.allow.setgroup
    that`s it
    sorry if they already are a plugin they can do that i just can find a plugin they do this

    sorry if i spell somse words wrong
     
  2. Offline

    99RedLions

    This is possible, as long as dev's don't obfuscate their code.
     
    dark2222 likes this.
  3. 99RedLions How? Without holding a database with all and every plugin + their permissions?

    //EDIT: And was has obfuscated code to do with that? Do you want to decompile the plugins and parse for hasPermission on the fly? If so: Don't worry, you'll be able to find hasPermission in obfuscated code, too, but there are plugins that don't call it directly, they have either their own way to check for parent permissions or use Vault, or...
     
  4. Offline

    99RedLions

    V10lator Well it could read the code of all of the other plugins. Hence me saying it wouldn't run if the devs obfuscated. If it found that the plugin was obfuscated, it would skip it.
    How do you think JD-GUI works? It doesn't hold a database of every program ever made and it's source.

    When it looks at the plugin it looks for player.isOp() / player.hasPermission().

    V10lator Well, doesn't Vault have an API?
    And you could also read the plugin.yml :p

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 23, 2016
  5. 99RedLions Yes, Vault has an API, that's why some plugins don't call hasPermission but let Vault call it. Detecting that in the plugins source is hard to impossible.
    And the plugin.yml doesn't help, too. You don't have to register your permissions there and there are plugins which don't...
     
  6. Offline

    99RedLions

    Oh, I assumed you had to in order for the commands/permissions to work. Couldn't you also check the dependancies in the plugin, and if it has Vault as one, then it looks at all the calls it is possible to make with vault?

    Not THAT hard.
     
  7. You know that hasPermission() - hasOp() is a bukkit API call and as such can't be obfuscated? But what's if "player" isn't called player, but sender, or p, or...?
    Also, what if I use that in my source:
    Code:java
    1. private boolean checkPerm(Player p, String perm)
    2. {
    3. if(p.hasPermission(perm))
    4. return true;
    5. while(perm.contains("."))
    6. {
    7. perm = perm.substring(0, perm.lastIndexOf('.') - 1);
    8. if(p.hasPermission(perm+".*"))
    9. return true;
    10. }
    11. if(p.hasPermission("*"))
    12. return true;
    13. return false;
    14. }

    and call checkPerm(player, "example.permission"); ? Or if I use Vault for my Permissions? Or...
     
  8. Offline

    99RedLions

    Well then it would be a goddamn big plugin.
    And also, why would you use that method? There's already player.hasPermission? And it could also just check for hasPermission / isOp?
     
  9. I use that as my default permissions check, so I slowly migrate it in all my plugins...
    Cause if player has the Permission foo.* and the plugin checks for foo.bla.blub hasPermission() returns false, while that returns true... I know quite a lot plugins which use similar functions...
     
  10. I would be fuc*ing damn good plugin :)
     
  11. Offline

    99RedLions

    oic. Maybe it isnt possible without a fuckton of work. I concede, you were right.
     
  12. Offline

    dark2222

    thanks i think that to
     
  13. I could try making a Design for the window and somthing
    :)
     
  14. Offline

    yttriuszzerbus

    Is it not possible to check the permissions from plugin.yml?
     
  15.  
  16. Offline

    number1_Master

    what i did on my plugins is when u type the help command, it also gives you the permission nodes for the commands associated with my plugin
    i think all plugin devs should do that, but, i personally avoid being lazy and read the permission nodes on the post
     
  17. Offline

    codename_B

    bPermissions has a function to do (kind of) this already.
     
  18. [​IMG]
    This is kin of what i want to make it look (zoom to see image)
     

    Attached Files:

  19. Window for plugin.jpg
    Kind of what i want it to look like
     
  20. Offline

    codename_B

    So bPermissions has a gui for this, I'll look into making it look sexier though
     

Share This Page