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

Commit

Permalink
rollback changes in Economy_Vault.java
Browse files Browse the repository at this point in the history
Former-commit-id: dcce054
  • Loading branch information
Ghost-chu committed Aug 1, 2018
1 parent 64d1d9a commit 4d88d4e
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/main/java/org/maxgamer/quickshop/Economy/Economy_Vault.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,35 @@ public boolean isValid() {
return this.vault != null;
}

@Deprecated
public boolean deposit(String name, double amount) {
return this.vault.depositPlayer(name, amount).transactionSuccess();
}

@Deprecated
public boolean withdraw(String name, double amount) {
return this.vault.withdrawPlayer(name, amount).transactionSuccess();
}

@Deprecated
public boolean transfer(String from, String to, double amount) {
if (this.vault.getBalance(from) >= amount) {
if (this.vault.withdrawPlayer(from, amount).transactionSuccess()) {
if (!this.vault.depositPlayer(to, amount).transactionSuccess()) {
this.vault.depositPlayer(from, amount);
return false;
}
return true;
}
return false;
}
return false;
}

@Deprecated
public double getBalance(String name) {
return this.vault.getBalance(name);
}

@Override
public String format(double balance) {
Expand Down

0 comments on commit 4d88d4e

Please sign in to comment.