Solved plugin.yml is invalid and i can't figure out why

Discussion in 'Plugin Development' started by Shmobi, Jul 2, 2015.

Thread Status:
Not open for further replies.
  1. Hello,
    As the title says, i made a plugin and i got stuck at the plugin.yml. It is very simple, but i am not often writing them, so i don't exactly know how it has to be structured. I copied the permission and command part from http://wiki.bukkit.org/Plugin_YAML
    This is how it looks now
    My plugin.yml (open)

    Code:
    name: Crates
    main: plugin.Crates
    version: 1.0
    
    commands:
       crate:
         description: Prefix for all cratecommands
         usage: Use /crate command value
    permissions:
       crate.*:
         description: Gives access to all crate commands
         children:
           crate.setview: true
           crate.setdrop: true
           crate.give: true
           crate.cmds: true
         default: false
       crate.setview:
         description: Allows you to change the view of a cratetype
         default: false
       crate.setdrop:
         description: Allows you to change the drop of a cratetype
         default: false
       crate.give:
         description: Allows you to give crates to players
         default: false
       crate.cmds:
         description: Shows all cratecommands to you
         default: false

    I can't figure out why this wont work, pls help me :)

    Thanks
     
  2. Offline

    mine-care

    Remove the blank line..
     
  3. Offline

    _Error

    I'm not familiar with this way of doing the plugin.yml, And remove the blank line.

    I use

    Code:
    name: myplugin
    main: package.class
    version: mypluginversion
    commands:
    mycommand:
    description: My command's description
    usage: /mycommand agruments
    permission: myplugin.mycommand
    permission-message: I usually leave this blank, I'm not sure where it's used. 
    And it might be how you registered your command in the class, and the way you linked it to your main class.
    If you did this and still does not work, Maybe show the classes if you don't mind.


    @Shmobi
     
  4. I found the error -.-
    like i said i did copy the part with commands and permissions and somehow this made one more space appear in every line. i just had to delete 1 space per line and it worked. for some reason it didn't show up in the snipped i posted, so you guys couldn't solve it, im sorry for that.

    @_Error code is fine. Thanks for the help. The blank line was on purpose because it is nicer to read than without. I just left that there for me :)
    @mine-care i fixed it and the blank line is still in the file, blank lines don't do anything. They are ignored by the Bukkitfilesystemstuff. I use them for readability
     
  5. Offline

    _Error

    Okay :)
     
  6. Offline

    mine-care

    @Shmobi Ηmm thats odd, i remember having a strugle a few years ago and it was due to an empty line hmmmmmm my memory isntt hat good though. Cheers.
     
    dlange likes this.
  7. Maybe they fixed it idk. But it works fine for me, even with the blank line
     
  8. Offline

    mine-care

    @Shmobi hmm probably although i didnt notice any changes to the API's code...
    Mabe i had the line in a StringList :3
     
  9. @mine-care that would be a thing. if you got a blank line direclty inside an entry it could fuck your up, because the formatter which is encoding the text of the plugin.yml maybe thinks that you end an entry with a blank line. but anyways, this topic is solved, whe should stop posting here
     
  10. Offline

    mine-care

    Thats probably it!
     
Thread Status:
Not open for further replies.

Share This Page