SharedBank
SharedBank Functions
These functions are found in RoyaleEconomy.apiHandler.sharedBank:
You can open all menus from a bank using their specific functions: - openSharedBankMainMenu(Player p) - openSharedBankDepositMenu(Player p) - openSharedBankWithdrawMenu(Player p) - openSharedBankUpgradeMenu(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 bankID, String byWho, String symbol, double amount). - bankID » the bank id - 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
You can also get the current bank upgrade the player has and set it with functions getSharedBankUpgrade(String playerUUID) and setSharedBankUpgrade(int upgrade, String playerUUID).
boolean isSharedBankOwner(Player p) » Verifies if a player is owner of any shared bank.
boolean createSharedBank(Player p) » Creates a shared bank for a player, return true if the bank was successfully created and false if the bank couldn't be created (example, player already has a shared bank).
boolean deleteSharedBank(Player p) » Deletes a shared bank for a player, returns true if the bank was successfully deleted and false if the bank couldn't be deleted (example, it doesn't exist).
boolean deleteSharedBank(String bankID) » You can delete banks based on ids too. Same returns as the function above.
boolean addMemberToSharedBank(Player toAdd, String bankID) » Adds a member to a shared bank. Returns false if the player couldn't be added. (example, player already has a bank, player doesn't exist, the bank doesn't exist).
boolean removeMemberFromSharedBank(Player toRemove, String bankID) » Removes a member from a shared bank. Returns false if the player couldn't be removed. (example, player is not part of the bank).
ArrayList<String> getSharedBankMembers(String bankID, boolean owner) » Returns the list of members of a bank as uuids parsed as strings. If owner is true, the first member in the list will be the uuid of the owner.
boolean transferOwnerShip(String oldOwnerUUID, String newOwnerUUID) » Changes the owner of a bank. The new uuid must be from the members' list. Returns false if the transfer fails.
ArrayList<String> getTransactionLog(String bankID) » Returns the list of transactions.
Last updated