Skip to content
This repository was archived by the owner on Dec 5, 2021. It is now read-only.

Commit 4d88d4e

Browse files
committed
rollback changes in Economy_Vault.java
Former-commit-id: dcce054
1 parent 64d1d9a commit 4d88d4e

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

src/main/java/org/maxgamer/quickshop/Economy/Economy_Vault.java

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,35 @@ public boolean isValid() {
2828
return this.vault != null;
2929
}
3030

31+
@Deprecated
32+
public boolean deposit(String name, double amount) {
33+
return this.vault.depositPlayer(name, amount).transactionSuccess();
34+
}
35+
36+
@Deprecated
37+
public boolean withdraw(String name, double amount) {
38+
return this.vault.withdrawPlayer(name, amount).transactionSuccess();
39+
}
40+
41+
@Deprecated
42+
public boolean transfer(String from, String to, double amount) {
43+
if (this.vault.getBalance(from) >= amount) {
44+
if (this.vault.withdrawPlayer(from, amount).transactionSuccess()) {
45+
if (!this.vault.depositPlayer(to, amount).transactionSuccess()) {
46+
this.vault.depositPlayer(from, amount);
47+
return false;
48+
}
49+
return true;
50+
}
51+
return false;
52+
}
53+
return false;
54+
}
55+
56+
@Deprecated
57+
public double getBalance(String name) {
58+
return this.vault.getBalance(name);
59+
}
3160

3261
@Override
3362
public String format(double balance) {

0 commit comments

Comments
 (0)