Ok so I have this code, but every time its ran the config stays with 0 bytes of data, but no exceptions are called. Code (Java): if (!(Main.q.contains(p.getUniqueId() + ".currency"))) { // Not sure if this is the correct if statement to use. p.sendMessage("Working | " + p.getUniqueId().toString()); // User gets this message Main.q.createSection(p.getUniqueId().toString()); Main.q.set(p.getUniqueId().toString() + ".currency", 0); } - The UUID.toString() does not return null, tested and confirmed. - The file path is correct, tested and confirmed. Main.q : Code (Java): public static FileConfiguration q; ... File fl = new File(Bukkit.getServer().getPluginManager().getPlugin("Shen").getDataFolder(), File.separator + "Shen.yml"); if (!(fl.exists())) { try { fl.createNewFile(); // This works } catch (IOException e) { e.printStackTrace(); } } q = YamlConfiguration.loadConfiguration(fl); Thanks in advance, not sure what im doing wrong here :\
To elaborate on previous answer. Configs are loaded to a Map in memory. You must explicitly call saveConfig() (or whatever save method you created if you made your own implementation) to write any changes to disk that you made with set().