EconAPI

338 Downloads

Ever needed a simple, clutter-free way to store player's balances between plugins? Then this is for you!

About

EconAPI is a clean and easy to use API that gives players with large plugins the ability to quickly and easily manage their economies and balances. With this plugin, you can easily get a player's 'Account' instance and manage their balances.

Commands/Permissions

None

Usage

// Get the EconAPI instance
EconAPI api = new EconAPI();

// Get the player's account
Account account = api.getAccount(p); 
// p is the instance of the current player

account.withdraw(100); 
// withdraw 100

account.deposit(20); 
// deposit 20

Integer balance = account.getBalance(); 
// get the accounts new balance

account.setBalance(200); 
// set the account balance to 200