diff --git a/Core/resources/config.yml b/Core/resources/config.yml index 1fd0e05c..9e957f23 100644 --- a/Core/resources/config.yml +++ b/Core/resources/config.yml @@ -3,7 +3,7 @@ # License: https://github.com/TheNewEconomy/EconomyCore/blob/main/license.md Core: - config-version: 5 + config-version: 6 #Cracked Server? Set this to true. May cause data issues as spigot/paper UUIDs are unpredictable. #Do not change this unless you know what you're doing. @@ -142,6 +142,9 @@ Core: #All configurations relating to the transaction system. Transactions: + #Should transactions be recorded? + Record: true + #The time format to use when displaying transaction history data. Format: "M, d y" diff --git a/Core/src/net/tnemc/core/manager/ReceiptManager.java b/Core/src/net/tnemc/core/manager/ReceiptManager.java index 64054e68..5ef5accf 100644 --- a/Core/src/net/tnemc/core/manager/ReceiptManager.java +++ b/Core/src/net/tnemc/core/manager/ReceiptManager.java @@ -18,6 +18,7 @@ * along with this program. If not, see . */ +import net.tnemc.core.config.MainConfig; import net.tnemc.core.transaction.Receipt; import java.util.ArrayList; @@ -48,7 +49,10 @@ public class ReceiptManager { */ public void log(final Receipt receipt) { - receipts.put(receipt.getId(), receipt); + if(MainConfig.yaml().getBoolean("Core.Transactions.Record")) { + + receipts.put(receipt.getId(), receipt); + } } /**