From 2b0ce135c56c9f1a2588f47675d03b681279bca9 Mon Sep 17 00:00:00 2001 From: Teriuihi Date: Wed, 14 Sep 2022 00:57:30 +0200 Subject: [PATCH] Fixed money dupe bug due to database only storing the secon to last remove balance --- src/main/java/com/alttd/playershops/shop/PlayerShop.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/alttd/playershops/shop/PlayerShop.java b/src/main/java/com/alttd/playershops/shop/PlayerShop.java index 75a2f15..06a4d82 100644 --- a/src/main/java/com/alttd/playershops/shop/PlayerShop.java +++ b/src/main/java/com/alttd/playershops/shop/PlayerShop.java @@ -181,9 +181,9 @@ public class PlayerShop { return false; // cancelled by another plugin, does this need logging? setDirty(true); - update(); this.balance -= amount; this.setLastTransaction(System.currentTimeMillis()); + update(); return true; }