Hey, Id like to know when this try catch loop ends because I have no clue? please note that I am really new to programming and just trying to understand the code/ changing the outcome/ format of the yml file ^^.
Feel free to ping or dm me if you help me or I should clarify things. ❤️
/* */ try {
/* 30 */ File file = new File(this.instance.getDataFolder().getAbsoluteFile() + "/player-data/" + player.getUniqueId() + ".yml");
/* 31 */ YamlConfiguration yamlConfiguration = YamlConfiguration.loadConfiguration(file);
/* 32 */ PlayerData playerData = getPlayerData(player.getUniqueId());
/* 33 */ if (!yamlConfiguration.contains("Balance")) {
/* 34 */ playerData.setBalance(this.instance.getSettingsFile().getConfig().getLong("Settings.Default Balance"));
/* */ } else {
/* 36 */ playerData.setBalance(yamlConfiguration.getLong("Balance"));
/* */ }
/* */
/* 39 */ if (!yamlConfiguration.contains("Pay Toggle")) {
/* 40 */ playerData.setPayEnabled(true);
/* */ } else {
/* 42 */ playerData.setPayEnabled(yamlConfiguration.getBoolean("Pay Toggle"));
/* */ }
/* */
/* 45 */ if (!yamlConfiguration.contains("Purchases")) {
/* 46 */ playerData.setPurchasedItemCount(0);
/* */ } else {
/* 48 */ playerData.setPurchasedItemCount(yamlConfiguration.getInt("Purchases"));
/* */ }
/* */
/* 51 */ yamlConfiguration.save(file);
/* */ } catch (Throwable $ex) {
/* */ throw $ex;
/* */ }
/* */ }```