me.mjolnir.mineconomy
Class Accounting

java.lang.Object
  extended by me.mjolnir.mineconomy.Accounting

public class Accounting
extends java.lang.Object

Handles reading/writing of the user accounts.

Author:
MjolnirCommando

Constructor Summary
Accounting()
           
 
Method Summary
static boolean containsKey(java.lang.String player, java.io.File file)
          Returns if player is in account file.
static double getBalance(java.lang.String player, java.io.File file)
          Returns the balance of any account.
static java.lang.String[] load()
          Returns an Array with the existing accounts and their values.
static void remove(java.lang.String player, java.io.File file)
          Removes an account from the account file.
static void setBalance(java.lang.String player, double balance, java.io.File file)
          Writes to the account file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Accounting

public Accounting()
Method Detail

containsKey

public static boolean containsKey(java.lang.String player,
                                  java.io.File file)
Returns if player is in account file.

Parameters:
player -
file -
Returns:
true/false

setBalance

public static void setBalance(java.lang.String player,
                              double balance,
                              java.io.File file)
Writes to the account file.

Parameters:
player -
balance -
file -

remove

public static void remove(java.lang.String player,
                          java.io.File file)
Removes an account from the account file.

Parameters:
player -
file -

getBalance

public static double getBalance(java.lang.String player,
                                java.io.File file)
Returns the balance of any account.

Parameters:
player -
file -
Returns:
balance

load

public static java.lang.String[] load()
Returns an Array with the existing accounts and their values.

Returns:
accounts