plugin.yml troubles

Discussion in 'Spigot Plugin Development' started by Cosmicluck, May 30, 2016.

  1. I am having a some issues with my plugin.yml and I can't for the life of me figure out what's wrong.

    As you can see below, I have my permissions set up correctly. But when I give myself the invmanage.* permission, it doesn't give me the children permissions and I don't know why. When I remove invmanage.* I can give myself the individual perms just fine. If anyone can help me i'd really appreciate it!

    Code (Text):
    permissions:
      invmanage.*:
        description: Allows access to all inventory tool permissions.
        children:
          invmanage.quickstack: true
          invmanage.junk: true
          invmanage.search: true
          invmanage.sort: true
      invmanage.quickstack:
        description: Allows the user to quickstack their inventory to nearby chests.
        default: op
      invmanage.junk:
        description: Allows the user to manage what they consider junk.
        default: op
      invmanage.search:
        description: Allows the user to search nearby chests for a specified item.
        default: op
      invmanage.sort:
        description: Allows the user to sort their inventory.
        default: op
     
  2. Have you tested that the children permissions work fine on their own?
    Eg: give yourself invmanage.sort and see if it works.
     
  3. Yeah but in order for them to work individually, I need to remove the invmanage.* permission from the plugin.yml entirely.
     
  4. Hmm... that's odd because it seems to be formatted correctly.
    Can you post your complete plugin.yml?
     
  5. Code (Text):
    main: com.cosmicluck.inventorytools.Main
    version: 1.0.1
    name: InventoryTools

    commands:
      manageinv:
        description: Manage your inventory!
        aliases: [mi]
      junk:
        description: Manage what items you consider junk.
        permission: invmanage.junk
      search:
        description: Search nearby chests for a specified item.
        permission: invmanage.search
       
    permissions:
      invmanage.*:
        description: Allows access to all inventory tool permissions.
        children:
          invmanage.quickstack: true
          invmanage.junk: true
          invmanage.search: true
          invmanage.sort: true
      invmanage.quickstack:
        description: Allows the user to quickstack their inventory to nearby chests.
        default: op
      invmanage.junk:
        description: Allows the user to manage what they consider junk.
        default: op
      invmanage.search:
        description: Allows the user to search nearby chests for a specified item.
        default: op
      invmanage.sort:
        description: Allows the user to sort their inventory.
        default: op
     
  6. Do you even need the permissions section? I don't use it.
     
  7. it would be nice to have instead of making server owners manually do every permission.
     
  8. Yes you need it otherwise the permissions don't register unless you register it somewhere in your class which is totally different.


    Try adding default: op for the * permission you aren't doing it for the others. Not sure if that will fix it but for my plugins I have default op for it
     
  9. Nope, didn't work unfortunately