Hi there, I'm fairly new to coding in JavaScript. I'm a lot more advanced when it comes to LUA. Either way, I'm attempting to create my own plugin that uses Vault as a dependency to then give players a command that will create a "shared bank". I don't believe my issues lie within the "commands" section of things but rather I'm having troubles creating a 'BANK_NAME.yml' file.
I assume that I have to create a .yml file for each shared bank that is created. Then, within that .yml file, I would store the balance of said bank, as well as a list of player name's and/or UUID's.
File dfile;
dfile = new File(getDataFolder(), bank_name);
if (!dfile.exists()) {
try{
dfile.createNewFile();
}catch(IOException e){
Bukkit.getServer().getLogger().severe(ChatColor.RED + "Could not create " + bank_name + ".yml");
}
}
data = YamlConfiguration.loadConfiguration(dfile);
Is the above code anywhere near what I would need to run in order to create the 'BANK_NAME.yml' file? If not, I would truly appreciate any help I can get. Otherwise, if that is close/spot on, what I would I then do to enter player name's into the .yml as "members" of the shared bank?
I may be very far off, and I'm open to criticism. I'm looking for all the help I can get as I dive into my plugin developing 'venture.