YamlConfiguration not loading file

Discussion in 'Spigot Plugin Development' started by kinukin, Jun 11, 2017.

  1. Code (Text):
        List<File> files = (List<File>) FileUtils.listFiles(customFile, TrueFileFilter.INSTANCE, TrueFileFilter.INSTANCE);
            for (File file : files) {
                System.out.println("file: " + file.getName());
                name2 = file.getName();
                if (!file.getName().endsWith(".yml")) continue;
                        customConfig = YamlConfiguration.loadConfiguration(file.getAbsoluteFile());

            }
    I'm trying to load a config file from a list but it's not loading! Any help would be good.

    Thank you
     
  2. If you're using the latest version on your server, the loadConfiguration has either moved or does not exist anymore (if you get the Class not found exception I'm also getting).