Skip to content

Commit

Permalink
✨ Fixed transfer bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurr0 committed Oct 9, 2021
1 parent 05fde43 commit 04420d3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>mineEconomy</groupId>
<artifactId>mineEconomy</artifactId>
<version>2.4.0</version>
<version>2.4.1</version>
<packaging>jar</packaging>

<name>mineEconomy</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ public void onPlayerTransfer(Player sender, OnlinePlayer target, double value) {
}

Profile targetProfile = this.profileService.getProfile(target.getPlayer().getUniqueId());
senderProfile.withdraw(atomicValue.get(), new BalanceOperationCallback() {
@Override
public void done() {
//ignore
}

@Override
public void cancel(CancelReason reason) {
//ignore
}
});

targetProfile.deposit(atomicValue.get(), new BalanceOperationCallback() {
@Override
public void done() {
Expand Down

0 comments on commit 04420d3

Please sign in to comment.