spigot make config file
@Override public void onEnable() { createFiles(); } private void createFiles(){ File configf = new File(getDataFolder(), "config.yml"); if(!configf.exists()){ configf.getParentFile().mkdirs(); saveResource("config.yml", false); } FileConfiguration config = new YamlConfiguration(); try{ config.load(configf); }catch (IOException | InvalidConfigurationException e){ e.printStackTrace(); } }