mirror of
https://github.com/AppleDash/SaneEconomy.git
synced 2024-11-26 12:05: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;
|
package org.appledash.saneeconomy.economy;
|
||||||
|
|
||||||
|
import com.google.common.base.Strings;
|
||||||
import org.bukkit.configuration.ConfigurationSection;
|
import org.bukkit.configuration.ConfigurationSection;
|
||||||
|
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
@ -32,6 +33,13 @@ public class Currency {
|
|||||||
} else {
|
} else {
|
||||||
symbols.setGroupingSeparator(',');
|
symbols.setGroupingSeparator(',');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String groupingSeparator = config.getString("grouping-separator", null);
|
||||||
|
|
||||||
|
if (!Strings.isNullOrEmpty(groupingSeparator)) {
|
||||||
|
symbols.setGroupingSeparator(groupingSeparator.charAt(0));
|
||||||
|
}
|
||||||
|
|
||||||
format.setDecimalFormatSymbols(symbols);
|
format.setDecimalFormatSymbols(symbols);
|
||||||
format.setGroupingUsed(true);
|
format.setGroupingUsed(true);
|
||||||
format.setGroupingSize(3);
|
format.setGroupingSize(3);
|
||||||
|
@ -7,6 +7,7 @@ currency:
|
|||||||
plural: dollars
|
plural: dollars
|
||||||
format: '0.00'
|
format: '0.00'
|
||||||
grouping: 3
|
grouping: 3
|
||||||
|
grouping-separator: ','
|
||||||
|
|
||||||
chat:
|
chat:
|
||||||
prefix: '&b[&9Economy&b]&r '
|
prefix: '&b[&9Economy&b]&r '
|
||||||
|
Loading…
Reference in New Issue
Block a user