Solved Permissions and Child Nodes

Discussion in 'Spigot Plugin Development' started by WAS, May 4, 2017.

  1. WAS

    WAS

    So I'm not sure what's up here. I have permissions, as follows

    Code (YAML):
      wechat.create:
        description
    : Allow creation of a channel
        default
    : false
      wechat.create.vaultcost
    :
        description
    : Player must pay a vault cost before creating a room
        default
    : false
      wechat.create.itemcost
    :
        description
    : Player must pay a item cost before creating a room
        default
    : false
      wechat.create.expcost
    :
        description
    : Player must pay a Experience cost before creating a room
        default
    : false
    But for some reason, when a plaer only has "wechat.create" they are registered as having "wechat.create.itemcost"

    I thought, hey, maybe it's inheriting children nodes? But it doesn't seem to be as it's the last block of code that executes...

    Code (Java):
            if (owner.hasPermission("wechat.create.expcost")) {
               if (!(costs.canProcessExpCost(owner.getUniqueId()))) {
                 failure = true;
               }
             }

             if (WeChat.doVault && owner.hasPermission("wechat.create.vaultcost")) {
               if (!(costs.canProcessVaultCost(owner.getUniqueId()))) {
                 failure = true;
               }
             }

             if (owner.hasPermission("wechat.create.itemcost")) {
               System.out.println("You have permission you do not have");
               if (!(costs.canProcessItemCost(owner.getUniqueId()))) {
                 failure = true;
               }
             }
    Anyone have any ideas?

    PS: I am using PEX

    Code (YAML):
    groups:
      default
    :
      options
    :
      default
    : true
      permissions
    :
      - modifyworld.*
      - essentials.build
      - essentials.chat
      - wechat.create
      - wechat.invite
      - wechat.buzz
      - wechat.list
      - wechat.users
      - wechat.format
      - wechat.format.urlcensor
      - wechat.create.itemcost
      - wechat.maxrooms.10
      - blastradius.place.DEFAULT
      - blastradius.buy
      - blastradius.buy.*
      - blastradius.sell
      - blastradius.give
      - blastradius.toss
      - blastradius.catalog
      - traile.allow.blocks
      - blip.trace
      - blip.purchase
      - blip.give
    schema-version
    : 1
     
     
    #1 WAS, May 4, 2017
    Last edited: May 4, 2017
  2. WAS

    WAS

    So after turning down the brightness on my monitor by like half (I'm really sick and screen was nauseating) I saw that I actually do have the permission node in question. Herpderp. I looked twice too. Lol