Hooking into RealBanks

RealBanksAPI

Here are the most important method you may use in the API.

First you may load the RealBanks in your JavaPlugin class

Getting started

RealBanks rb = (org.rominos2.RealBanks.api.RealBanks) this.getServer().getPluginManager().getPlugin("RealBanks");

The RealBanks plugin is divided in WorldManager for each World
That's way you can use :

WorldManager manager = rb.getManager(World world);

In each Manager, you can access all the Banks in this World and also handle them...

Bank bank = manager.getBank(String bankName);
Bank bank = manager.getBank(Chest chest);

With these banks you can do whatever you want with them :

bank.getAccount(OfflinePlayer player);
bank.addChest(Chest chest);
bank.openVirtualTransaction(Player player, BankAccount account, String reason);

And of course a LOT of methods in BankAccount, Transaction, ....


Properties ?

Each WorldManager has its own properties

WorldSettings properties = manager.getProperties();

properties.isActive();
properties.getColor();
properties.getConnectCost(); (need Eco Support)

These informatiosn can't be modified.

But every Bank have its own Properties too !

BankSettings properties = bank.getProperties

properties.getAccountLimit();
properties.getEnterPermission();

properties.setAccountLimit(int value);
properties.setEnterPermission(String perm);

Creating New Bank

You can also create new Banks with a constructor :

manager.createBank(String name);

And that's it, your bank is now available in the world (and a RealBanksBankEvent event is fired :) ).


I Want Moar !

You still want moar after that ?

If you really want more, you can look at the JavaDoc : Hosted JavaDoc

With these informations, you are ready to code somtething with RealBanks.
Don't forget to send me the link of your plugin to paste it in the "RealBanks plugins list" on the Main page of RealBanks Project

Have Fun !