From 99ddfe9673ef623fa23712f35dce6778be2c4b47 Mon Sep 17 00:00:00 2001 From: Sleaker Date: Wed, 29 Feb 2012 21:51:11 -0800 Subject: [PATCH] fixup createAccount for VaultEco implementation of Register --- src/net/milkbowl/vault/VaultEco.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/net/milkbowl/vault/VaultEco.java b/src/net/milkbowl/vault/VaultEco.java index c8cfb20..2fb5877 100644 --- a/src/net/milkbowl/vault/VaultEco.java +++ b/src/net/milkbowl/vault/VaultEco.java @@ -34,11 +34,10 @@ public class VaultEco implements Method { @Override public boolean createAccount(String name, Double amount) { - if (hasAccount(name)) { + if(!this.economy.createBank(name, "").transactionSuccess()) { return false; } - - return false; + return this.economy.bankDeposit(name, amount).transactionSuccess(); } public String getName() { @@ -77,13 +76,6 @@ public class VaultEco implements Method { return this.economy.createPlayerAccount(name); } - public boolean createAccount(String name, double balance) { - if(!this.economy.createBank(name, "").transactionSuccess()) { - return false; - } - return this.economy.bankDeposit(name, balance).transactionSuccess(); - } - public MethodAccount getAccount(String name) { if(!hasAccount(name)) return null;