Bank

Bank Functions

These functions are found in RoyaleEconomy.apiHandler.bank:

You can open all menus from a bank using their specific functions: - openBankMainMenu(Player p) - openBankDepositMenu(Player p) - openBankWithdrawMenu(Player p) - openBankUpgradeMenu(Player p)

You can log transactions that don't even exist, adding a transaction log is not the same with adding money. For logging transactions you need to use addTransactionLog(String playerUUID, String byWho, String symbol, double amount). - playerUUID » player's uuid parsed as string - byWho » coloured name that will be displayed as transaction maker ("by %byWho%). - symbol » + or - anything else will give an error - amount » the amount of coins in this transaction

String playerUUID = e.getPlayer().getUniqueId().toString();
RoyaleEconomy.apiHandler.bank.addTransactionLog(playerUUID, "&8Server", "+", 1500);

You can also get the current bank upgrade the player has and set it with functions getBankUpgrade(String playerUUID) and setBankUpgrade(int upgrade, String playerUUID).

String playerUUID = e.getPlayer().getUniqueId().toString();
int currentUpgrade = RoyaleEconomy.apiHandler.bank.getBankUpgrade(playerUUID);
RoyaleEconomy.apiHandler.bank.setBankUpgrade(currentUpgrade+1, playerUUID);

ArrayList<String> getTransactionLog(String playerUUID) » Returns the list of transactions.

Last updated