Permission Node Disabler

Discussion in 'Archived: Plugin Requests' started by IdealIdeas, Jun 16, 2013.

  1. Offline

    IdealIdeas

    Ok so this is complicated to explain.
    - I have PermissionsEx and I have all the ranks setup, but some commands players can buy, through the use of Server Signs adding the permission directly to that user.

    - For certain instances, like say a dungeon, or maze I want those user owned permissions to be temporarily disabled. I cant just have it remove the permission then add it again at the end of the dungeon/maze as some users might not of bought the removed command previously and they would of then got them for free.

    - I do not use world guard, I use regios and it would be a big hassle to switch region plugins. Regios can actively remove/add permissions through entering/exiting a region but from my tests they have proven somewhat unreliable.

    My thoughts on how this would work:
    - The Permission Node I give the player will disable the command, Example: I give the permission node disable.fly to a player. Now whenever the player does /fly the plugin will say "This command is disabled for you", and would then deny the command from happening.

    - The 2nd portion of the disable permission node would relate to the command.

    The whole reasoning behind a permission node disabling another is then I can add/remove the disabling node to players without worry about giving permissions to players that they havent previously obtained.
     
  2. Offline

    Necrodoom

    an easier system is to add a negation node directly to player, and remove the negation node when needed. this way you dont have to do any complex checking for permissions.

    problem is getting what command needs what permission.
     
  3. Offline

    IdealIdeas

    I have an idea. how about this:
    - I give permission node disable.fly to a player.
    - What ever is after the disable portion of the permission node is the command.
    - So if the player has disable.fly and they do the command /fly it will say "Sorry this command is disabled right now" and deny use of the command.

    This way it doesnt need to check nodes, it would check the command they use instead. The plugin would just only have to worry about the intial command and not any variables like /warp (name), if the player has disable.warp then any command that starts with /warp would not work.
     
  4. Offline

    Necrodoom

    this sounds like the current worldguard blocked-cmds flag then.
     
    timtower likes this.
  5. Offline

    IdealIdeas

    Well there lies a problem, I use Regios not world guard.
    Plus it would be simpler to have something like this than use another bulky plugin.
     
  6. Offline

    timtower Administrator Administrator Moderator

    Some permissions plugins have an configurable timer permission, try that
     
  7. Offline

    Necrodoom

    oh, sorry, misread your post. anyway, your suggestion sounds easy enough to do, hope someone will look at it.
     
  8. Offline

    IdealIdeas

    Updated how it should work to relate to the new method since it seems easier to do. on first post.

    How is that going to disable a permission that they already have?
    Timed permissions GIVE them a permission for x-amount of time.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 2, 2016
  9. Offline

    ZerothAngel

    The underlying Bukkit API that deals with temporary permissions (which I assume is used by all/most permissions plugins that have this feature) allows you to specify the value of the temporary permission (true/false). It's quite easy to negate an existing permission.

    But then again, you seem to want something that's based on region rather than time. So this probably won't be very useful to you anyway.

    There is a permission plugin that supports region-specific permissions... ;) But if you aren't willing to switch to WorldGuard (not saying you should), then you're probably 10X as unwilling to switch to a different permissions plugin. (Regios support in zPerms is done but untested/uncommitted.)

    There was this project, but apparently it's been dropped. Doesn't look like it supported Regios either.

    Still, interesting request...
     
  10. Offline

    timtower Administrator Administrator Moderator

    How about giving them an negate permission? Like "- -fly"
     
  11. Offline

    IdealIdeas

    wait I can do that?

    So if the player has the permission node essentials.fly and I gave them -essentials.fly, it would effectively stop them from being able to use that command?
    Or does giving them -essentials.fly replace the other one?
     
  12. Offline

    timtower Administrator Administrator Moderator

    It does not replace it, but the only way to find out is to try it ;)
     
  13. Offline

    IdealIdeas

    Nope doesnt work.
    From what ive read, it does work if the negate permission came first in the .yml file but the problem is when the negation node is added it gets added to the bottom of the players list of nodes, which then gets ignored.

    Basically This wont work:
    Player:
    permission:
    - essentials.fly
    - -essentials.fly

    But this would:
    Player:
    permission:
    - -essentials.fly
    - essentials.fly

    Now the problem with this is it means I would STILL have to give permissions to players that they might not have already bought...

    It seems like this plugin request is still needed.
     
  14. Offline

    timtower Administrator Administrator Moderator

  15. Offline

    IdealIdeas

    yes but thats a planned feature, they updated maybe twice since they added that list and only knock out 1-2 things off that list. They have made very little progress towards adding features lately, they have more or less just updated it to work with new builds of server.
     

Share This Page