From cb208c710f777ff6433d85c7f5389b38bc86413b Mon Sep 17 00:00:00 2001 From: Allink Date: Sat, 20 May 2023 06:08:17 +0100 Subject: [PATCH] Refactor transaction balance methods to be more in-line with EconomicEntityData --- .../me/totalfreedom/fossil/economy/SimpleTransaction.java | 6 +++--- .../src/main/java/me/totalfreedom/economy/Transaction.java | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Fossil/src/main/java/me/totalfreedom/fossil/economy/SimpleTransaction.java b/Fossil/src/main/java/me/totalfreedom/fossil/economy/SimpleTransaction.java index 8fb9b8c..958634f 100644 --- a/Fossil/src/main/java/me/totalfreedom/fossil/economy/SimpleTransaction.java +++ b/Fossil/src/main/java/me/totalfreedom/fossil/economy/SimpleTransaction.java @@ -43,15 +43,15 @@ public class SimpleTransaction implements Transaction } @Override - public long addBalance(long amount) + public long addToBalance(long amount) { return balance.addAndGet(amount); } @Override - public long removeBalance(long amount) + public long removeFromBalance(long amount) { - return this.addBalance(-amount); + return this.addToBalance(-amount); } @Override diff --git a/Patchwork/src/main/java/me/totalfreedom/economy/Transaction.java b/Patchwork/src/main/java/me/totalfreedom/economy/Transaction.java index fc094cc..3413976 100644 --- a/Patchwork/src/main/java/me/totalfreedom/economy/Transaction.java +++ b/Patchwork/src/main/java/me/totalfreedom/economy/Transaction.java @@ -10,9 +10,9 @@ public interface Transaction long getBalance(); - long addBalance(final long amount); + long addToBalance(final long amount); - long removeBalance(final long amount); + long removeFromBalance(final long amount); void setBalance(final long newBalance); }