net.milkbowl.vault.economy
Class EconomyManager

java.lang.Object
  extended by net.milkbowl.vault.economy.EconomyManager

public class EconomyManager
extends java.lang.Object


Constructor Summary
EconomyManager(JavaPlugin plugin)
          Constructs a new instance of EconomyManager provided an instance of a JavaPlugin
 
Method Summary
 EconomyResponse depositPlayer(java.lang.String playerName, double amount)
          Deposit amount to a player account
 java.lang.String format(double amount)
          Formats value to human readable forms
 EconomyResponse getBalance(java.lang.String playerName)
          Returns current player balance
 java.lang.String getName()
          Accessor for Name of Economy
 EconomyResponse withdrawPlayer(java.lang.String playerName, double amount)
          Withdraw amount from a player account
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EconomyManager

public EconomyManager(JavaPlugin plugin)
Constructs a new instance of EconomyManager provided an instance of a JavaPlugin

Parameters:
plugin - Your plugin (should be "this")
Method Detail

getName

public java.lang.String getName()
Accessor for Name of Economy

Returns:
Name of active Economy

format

public java.lang.String format(double amount)
Formats value to human readable forms

Parameters:
amount - Value to format
Returns:
Human readable form of amount

getBalance

public EconomyResponse getBalance(java.lang.String playerName)
Returns current player balance

Parameters:
playerName - Player name
Returns:
Response containing amount (balance) and other meta data

withdrawPlayer

public EconomyResponse withdrawPlayer(java.lang.String playerName,
                                      double amount)
Withdraw amount from a player account

Parameters:
playerName - Player name
amount - Amount to withdraw
Returns:
Response containing amount removed, and new balance

depositPlayer

public EconomyResponse depositPlayer(java.lang.String playerName,
                                     double amount)
Deposit amount to a player account

Parameters:
playerName - Player name
amount - Amount to deposit
Returns:
Response containing amount added, and new balance


MilkBukkit, 2011