mirror of
https://github.com/AppleDash/SaneEconomy.git
synced 2024-11-26 03:55:46 +01:00
Add support for changing grouping separator.
This commit is contained in:
parent
55e58d0ac3
commit
3670ebaadd
@ -1,5 +1,6 @@
|
||||
package org.appledash.saneeconomy.economy;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
@ -32,6 +33,13 @@ public class Currency {
|
||||
} else {
|
||||
symbols.setGroupingSeparator(',');
|
||||
}
|
||||
|
||||
String groupingSeparator = config.getString("grouping-separator", null);
|
||||
|
||||
if (!Strings.isNullOrEmpty(groupingSeparator)) {
|
||||
symbols.setGroupingSeparator(groupingSeparator.charAt(0));
|
||||
}
|
||||
|
||||
format.setDecimalFormatSymbols(symbols);
|
||||
format.setGroupingUsed(true);
|
||||
format.setGroupingSize(3);
|
||||
|
@ -7,6 +7,7 @@ currency:
|
||||
plural: dollars
|
||||
format: '0.00'
|
||||
grouping: 3
|
||||
grouping-separator: ','
|
||||
|
||||
chat:
|
||||
prefix: '&b[&9Economy&b]&r '
|
||||
|
Loading…
Reference in New Issue
Block a user