copyDefaults() doesn't copy everything

Discussion in 'Plugin Development' started by Darkman2412, Oct 12, 2011.

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

    Darkman2412

    Hi!

    First of all, in my opinion, the old configuration was good enough. Anyways, I followed @Dinnerbone 's tut (http://forums.bukkit.org/threads/he...configureable-by-the-users.40981/#post-740663) about the new config. I placed the standard config.yml in my .jar.
    Let's compare the standard config.yml and the one in the plugin folder when I start my server:
    Standard config.yml:
    Code:
    #######################
    #   Breeding Config   #
    # Made by Darkman2412 #
    # teh bigbang project #
    #######################
    general:
        spawn-chance: 0.5
    
    # List all mobs than CAN spawn, here:
    mobs:
        Skeleton
        Zombie
        Slime
        Chicken
        Cow
    New one:
    Code:
    general:
      spawn-chance: 0.5
    mobs: Skeleton Zombie Slime Chicken Cow
    
    It doesn't copy the comments + tabs (or new lines, idk). Am I doing something wrong?

    Thanks!
    Darkman2412
     
  2. Offline

    desht

    Your standard config doesn't look right. I'm assuming "mobs" needs to be a list of the mobs that can spawn, in which case your YAML needs to look like:

    Code:
    #######################
    #   Breeding Config   #
    # Made by Darkman2412 #
    # teh bigbang project #
    #######################
    general:
        spawn-chance: 0.5
    
    # List all mobs than CAN spawn, here:
    mobs:
        - Skeleton
        - Zombie
        - Slime
        - Chicken
        - Cow
    
     
  3. Offline

    Darkman2412

    @desht
    Oh, yeah... It was a long time ago for me :confused:
    But the comments still get removed D:
     
Thread Status:
Not open for further replies.

Share This Page