Problem loading config

Discussion in 'Plugin Development' started by ItsLeoFTW, Feb 9, 2014.

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

    ItsLeoFTW

    Hi. I'm having a little problem with my plugin... I can not figure out how to load the config.yml file.
    Here's my configuration loading code:
    Code:java
    1. FileConfiguration fc = new File(Bukkit.getServer().getPluginManager().getPlugin("OITC").getDataFolder(), "config.yml"){};
     
  2. Offline

    Maurdekye

    ItsLeoFTW What do you plan to do with the config.yml?
     
  3. Offline

    xTrollxDudex

    ItsLeoFTW
    You know you could just use getConfig() right?
     
  4. Offline

    ItsLeoFTW

  5. Offline

    xTrollxDudex

    ItsLeoFTW
    PHP:
    FileConfiguration config YamlConfiguration.loadConfiguration(/* File */);
    Note that if you do this, the config will clear all changes made since the last save.
     
Thread Status:
Not open for further replies.

Share This Page