mirror of
https://github.com/MilkBowl/Vault.git
synced 2025-01-17 13:41:31 +01:00
fixup createAccount for VaultEco implementation of Register
This commit is contained in:
parent
da11aa5fb1
commit
99ddfe9673
@ -34,11 +34,10 @@ public class VaultEco implements Method {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean createAccount(String name, Double amount) {
|
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();
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
@ -77,13 +76,6 @@ public class VaultEco implements Method {
|
|||||||
return this.economy.createPlayerAccount(name);
|
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) {
|
public MethodAccount getAccount(String name) {
|
||||||
if(!hasAccount(name))
|
if(!hasAccount(name))
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user