Removing permission from operators by default

Discussion in 'Plugin Development' started by lol768, Dec 16, 2012.

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

    lol768

    I'm currently maintaining BattleKits and it has a feature where kits are automatically given back after you die. This is managed by permissions - if the player has the permission BattleKits.auto.KitName (anything the server admin sets it as) then they are automatically given their last kit on respawn. Unfortunately as operators have all permissions by default unless otherwise specified, they are subject to this.

    I want to make it so that by default nobody has this permission. I've tried adding something like this to my plugin.yml (indentation is broken):
    Code:YAML
    1.  
    2. permissions:
    3. BattleKits.auto:
    4. default: false
    5. description: Auto-respawns all kits
    6. BattleKits.auto.*:
    7. default: false
    8. description: Auto-respawns all kits
    9.  


    But it doesn't seem to work. What am I doing wrong?
     
  2. Offline

    Barinade

    if (hasPermission && !(isOp)) ?
     
  3. Offline

    fireblast709

  4. Offline

    lol768

    I can't because the kit name can be anything the server owner supplies

    Wouldn't that stop operators from being able to use this functionality totally? I want it available to all players but only if they want it enabled. Thinking a config option might be better...

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 30, 2016
Thread Status:
Not open for further replies.

Share This Page