Solved Would this be a valid permissions setup

Discussion in 'Plugin Development' started by MrAwellstein, May 8, 2014.

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

    MrAwellstein

    Okay so I figured it out. You can have as many layers as you need (A layer would be like Layer1.Layer2.Layer3), but something important to note when testing is that (at least with group manager) an OP has all permissions. Meaning that Player.hasPermission() always returns true for Ops.

    The original Question (open)

    Well as the title of this thread says, I'm wondering if this would work (I can't test until Monday so I'm just coding without an IDE right now.

    Also if someone has example.* will they automatically get the permissions in the sublevels or do I have do check if they have the top level permission?

    Code:yml
    1.  
    2. permissions:
    3. example.*:
    4. description: Gives access to all groups of perms
    5. children:
    6. example.group1.*: true
    7. example.group1.*:
    8. description: Gives access to group1 of perms
    9. children:
    10. example.group1.perm1: true
    11. example.group1.perm1:
    12. description: Allows you access to perm1
    13.  

     
  2. Offline

    DeluXeNationMC

    Code:
    permissions:
        DeluXe.Launch:
            description: Allows The Player To Get Launched
            default: op
        DeluXe.NoFall:
            description: Stops FallDamage When Launched
            default: op
        DeluXe.DoubleJump:
            description: Allows The Player To Use DoubleJump
            default: op
        DeluXe.*:
            description: Allows All The Permissions To Be Used
            children:
                DeluXe.Launch: true
                DeluXe.NoFall: true
            default: op
    These are my permissions i guess you could edit it to your liking :)
     
  3. Offline

    MrAwellstein

    I need at least 3 levels. Not 2. I am only asking this because I'm unsure if it will be parsed wrong because of the second dot for the third level in my example.
     
  4. Offline

    DeluXeNationMC

    Code:
        DeluXe.*:
            description: Allows All The Permissions To Be Used
            children:
                DeluXe.Launch: true
                DeluXe.NoFall: true
            default: op
    Under the "children:" you can add as much "children" as you want i am sorry if this does not answer your question, i am having a hard time understanding what you are asking.
     
  5. Offline

    Necrodoom

    Seems to follow standard permission rules to me.
    Id guess give example.* and check if example.group1.perm1 is true to validate?
     
  6. Offline

    MrAwellstein

    Can't test for a week so that's why I'm asking.
    But you're right it does follow the standard rule. Kinda.
     
Thread Status:
Not open for further replies.

Share This Page