diff options
Diffstat (limited to 'EssentialsiConomyBridge/src/com/nijiko/coelho/iConomy/system/Bank.java')
-rw-r--r-- | EssentialsiConomyBridge/src/com/nijiko/coelho/iConomy/system/Bank.java | 65 |
1 files changed, 34 insertions, 31 deletions
diff --git a/EssentialsiConomyBridge/src/com/nijiko/coelho/iConomy/system/Bank.java b/EssentialsiConomyBridge/src/com/nijiko/coelho/iConomy/system/Bank.java index b70803dda..54e8e6387 100644 --- a/EssentialsiConomyBridge/src/com/nijiko/coelho/iConomy/system/Bank.java +++ b/EssentialsiConomyBridge/src/com/nijiko/coelho/iConomy/system/Bank.java @@ -1,53 +1,56 @@ package com.nijiko.coelho.iConomy.system; -import com.earth2me.essentials.EcoAPI; +import com.earth2me.essentials.api.Economy; import com.nijiko.coelho.iConomy.existCheck; -public class Bank { - - //The fake formatter - - public String format(double amount) { - return EcoAPI.format(amount); - } +public class Bank +{ + //The fake formatter + public String format(double amount) + { + return Economy.format(amount); + } //Fake currency! - - public String getCurrency() { - return EcoAPI.getCurrency(); - } + public String getCurrency() + { + return Economy.getCurrency(); + } //Fake "does player have an account?" but essentials eco doesnt need to make one, so TRUE, unless its an NPC. - - public boolean hasAccount(String account) { - if (!existCheck.exist(account)){ - if (!EcoAPI.accountExist(account)){ - EcoAPI.newAccount(account); - } + public boolean hasAccount(String account) + { + if (!existCheck.exist(account)) + { + if (!Economy.accountExist(account)) + { + Economy.newAccount(account); + } } return true; } - + //simply switches the name to an account type? - - public Account getAccount(String name){ - Account Account=null; - Account=new Account(name); + public Account getAccount(String name) + { + Account Account = null; + Account = new Account(name); hasAccount(name); return Account; } - + //Fake remove account - - public void removeAccount(String name){ - if (!existCheck.exist(name)){ - if (EcoAPI.accountExist(name)){ - EcoAPI.removeAccount(name); + public void removeAccount(String name) + { + if (!existCheck.exist(name)) + { + if (Economy.accountExist(name)) + { + Economy.removeAccount(name); } return; } - EcoAPI.setMoney(name, 0); + Economy.setMoney(name, 0); } - } |