copy comments with copyDefaults ?

Discussion in 'Plugin Development' started by MG127, Nov 12, 2011.

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

    MG127

    its realy a great new feature, but what i miss is to copy comments.
    as it is now, it copies only the keys and values.
     
  2. A) It copies comments
    B) This is the completely wrong section
     
  3. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    @MG127

    Moved to Plugin Development.
     
  4. Offline

    MG127

    i've tried it, but the result file was without any comments
    @tips48
    did you use anything else than this?
    getConfig().options().copyDefaults(true)
     
  5. Offline

    md_5

    @tips48 it doesn't copy comments for me. Only the first line of comments, ie the header. Doesn't bother me anyway.
     
  6. @md_5
    @MG127
    The parser if VERY picky, althought it does copy comments. Make sure all your comments are:
    # HI
    NOT:
    #HI
    # HI
    @NinjaZidane helped me alot with this, maybe he can help you if its still not working :)
     
  7. Offline

    MG127

    i had 3 comments with a space after the # the rest was without (non copied)
    i've tried several things, but only the first line, if it is a comment, will be copied
     
  8. Offline

    md_5

    Thanks, you know what, I had # Comment for Guardian but #comment for AutoGroup, thanks for that info.
     
  9. Of course :) Good luck with Guardian!
     
  10. Offline

    MG127

    here are the first few lines (for testing) from my config.yml
    Code:
    # test
    # blub
    settings:
    # test2
        bedrock:
    # test3
        # test4
            # test 5
    only the first 2 lines of comments are written now ... i just refreshed the file in eclipse again till the last time
     
  11. Offline

    Sagacious_Zed Bukkit Docs

    The Configuration API has no facility to write in-line comments, it only supports a header comment.
     
    MG127 likes this.
Thread Status:
Not open for further replies.

Share This Page