From e42c1fde658f6084ec20f5ec28c664b651e2f80d Mon Sep 17 00:00:00 2001 From: AppleDash Date: Fri, 5 Oct 2018 05:31:37 -0400 Subject: [PATCH] SomeBODY once told me --- .../java/org/appledash/saneeconomy/economy/Currency.java | 6 ++++++ SaneEconomyCore/src/main/resources/config.yml | 1 + 2 files changed, 7 insertions(+) diff --git a/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/economy/Currency.java b/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/economy/Currency.java index 1b57d87..898388d 100644 --- a/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/economy/Currency.java +++ b/SaneEconomyCore/src/main/java/org/appledash/saneeconomy/economy/Currency.java @@ -48,6 +48,12 @@ public class Currency { symbols.setGroupingSeparator(groupingSeparator.charAt(0)); } + String decimalSeparator = config.getString("decimal-separator", "."); + + if (!Strings.isNullOrEmpty(decimalSeparator)) { + symbols.setDecimalSeparator(decimalSeparator.charAt(0)); + } + format.setDecimalFormatSymbols(symbols); format.setGroupingUsed(true); format.setGroupingSize(3); diff --git a/SaneEconomyCore/src/main/resources/config.yml b/SaneEconomyCore/src/main/resources/config.yml index 9c89a2f..f0f69e5 100644 --- a/SaneEconomyCore/src/main/resources/config.yml +++ b/SaneEconomyCore/src/main/resources/config.yml @@ -9,6 +9,7 @@ currency: format: '0.00' grouping: 3 grouping-separator: ',' + decimal-separator: '.' chat: prefix: '&b[&9Economy&b]&r '