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
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...
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 EDIT by Moderator: merged posts, please use the edit button instead of double posting.
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...
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.
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 private boolean checkPerm(Player p, String perm) {if(p.hasPermission(perm)) return true;while(perm.contains(".")){ perm = perm.substring(0, perm.lastIndexOf('.') - 1); if(p.hasPermission(perm+".*"))return true;}if(p.hasPermission("*")) return true;return false; } and call checkPerm(player, "example.permission"); ? Or if I use Vault for my Permissions? Or...
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?
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...
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