From 39d2be041b2ad1158c2a719418899c7f5351a1c2 Mon Sep 17 00:00:00 2001 From: creatorfromhell Date: Thu, 21 Dec 2023 18:32:28 -0500 Subject: [PATCH] Fix SQL issue, added message to TNE reload. --- .../tnemc/core/currency/loader/DefaultCurrencyLoader.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Core/src/net/tnemc/core/currency/loader/DefaultCurrencyLoader.java b/Core/src/net/tnemc/core/currency/loader/DefaultCurrencyLoader.java index c57a5135..a7a965d8 100644 --- a/Core/src/net/tnemc/core/currency/loader/DefaultCurrencyLoader.java +++ b/Core/src/net/tnemc/core/currency/loader/DefaultCurrencyLoader.java @@ -328,6 +328,12 @@ public boolean loadDenomination(Currency currency, File denomFile) { final String plural = denom.getString("Info.Plural", "Dollars"); final BigDecimal weight = BigDecimal.valueOf(denom.getDouble("Options.Weight", 1)); + if(weight.compareTo(BigDecimal.ZERO) <= 0) { + TNECore.log().error("Failed to load denomination: " + denomFile.getName() + ". Invalid Options.Weight Value: " + weight.toPlainString(), DebugLevel.OFF); + return false; + } + + final String material = denom.getString("Options.Material", "PAPER"); Denomination denomination = (currency instanceof ItemCurrency)?