RoyaleEconomy
  • RoyaleEconomy Documentation [NOT UP TO DATE]
  • Hooks
  • PlaceholderAPI Support
  • Commands
    • royaleeconomy
    • talismans
    • killcoins
    • interest
    • coinsbag
    • reshop
    • balancetop
    • piggybank
    • bank
    • sharedbank
  • Menus
  • InputGUIs
  • Shops
  • Purse On Death
  • Sounds
  • Permissions
  • Coins Bags
  • Bank Upgrades
  • Interest
  • Kill Coins
  • Talismans
    • Random Coins Talisman
    • Percent Reducer Talisman
    • Death Saver Talisman
  • API
    • Events
    • Balance
    • BalanceTop
    • Bank
    • SharedBank
    • Interest
    • Kill Coins
    • Shops
    • Others
Powered by GitBook
On this page

Was this helpful?

  1. API

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.

PreviousBalanceTopNextSharedBank

Last updated 4 years ago

Was this helpful?