Why is my custom config file created in the root server directory?

Discussion in 'Plugin Development' started by quaz3l, Dec 14, 2011.

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

    quaz3l

    I don't have my code at hand right now but I followed the custom config file tutorial that is on the wiki http://wiki.bukkit.org/Introduction_to_the_New_Configuration, but basicly what is happening is that when my plugin is enabled by the server it creates the normal config.yml correctly and in my plugin directory but when the custom config file is created, it gets placed in the root directory of the server.

    Why is this happening?
    And
    How can I fix it to place my custom config in the proper directory?

    Also if I don't have enough info to solve the problem, I can put my code on tommarrow night.
     
  2. Offline

    Sagacious_Zed Bukkit Docs

    @quaz3l
    When you initialized the File object which represented where you would save your file, what did you initialize it with? i.e. which values did you give to the constructor?
     
  3. Offline

    quaz3l

    I recall using (getDataFolder(), "races.yml")
     
  4. Offline

    Sagacious_Zed Bukkit Docs

  5. Offline

    quaz3l

    Thank you it works now!
     
Thread Status:
Not open for further replies.

Share This Page