Hello everybody i have a little problem with making a java command for program i have some code but i do not know how to continue i stuck in one place BTW the command i want to make is
/sendcash [username] [money] // how it looks like
I have this code
if (cmd.equals(AdminCommands[1])) {
String player = scanner.next();
String money = scanner.next();
File folder = new File(player);
File pFile = new File(folder, player + ".txt");
File bFile = new File(folder, money + ".txt");
if (pFile.exists() && bFile.exists()) {
try {
Account playerAccount = new Account(player, money);
// Sending money code here ... how to transfer it ?
} catch (Exception e) {
JOptionPane.showMessageDialog(null, "Username doesn't exist!");
}
}
} else {
LabelInfo.setText("Command doesn't exist!");
}
So after the Account playerAccount ... i don't know how to continue to transfer the money...
Thanks for your time :)