I can't read my config

Discussion in 'Plugin Development' started by Fedmand, Dec 23, 2013.

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

    Fedmand

    Hello people,

    I'm getting this huge error message when i turn on my server: http://pastebin.com/Wc6N6EWx
    I'm simply trying to load my config file. (by the name config.yml)

    I'm loading the config in onEnable like this:
    getConfig().options().copyDefaults(true);

    I'm loading some config info in another class called "Management". My main class: "Main".
    Could that be a problem? I don't even know.
    This is what information i recieve in my "Management" class:
    Code:java
    1. Location lobby = new Location(Bukkit.getWorld("world"), getConfig().getInt(
    2. "lobbyX"), getConfig().getInt("lobbyY"), getConfig().getInt(
    3. "lobbyZ"));

    (This is line 20 btw)

    I hope you guys have a solution for this. Thanks so much!
     
  2. Offline

    agokhale1

    Fedmand
    In your onEnable method, you have to do either saveConfig(); or saveDefaultConfig();
     
  3. Offline

    Fedmand

    I did this and that didn't work out :( Any other ideas?
     
Thread Status:
Not open for further replies.

Share This Page