Fix number formatting for different system locale
This commit is contained in:
parent
2ad2c20aaf
commit
5babd8a41a
@ -1,6 +1,9 @@
|
||||
package mineplex.core.common.util;
|
||||
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.DecimalFormatSymbols;
|
||||
import java.text.NumberFormat;
|
||||
import java.util.Locale;
|
||||
import java.util.Random;
|
||||
|
||||
import org.bukkit.Location;
|
||||
@ -16,7 +19,8 @@ public class UtilMath
|
||||
for (int i=1 ; i<degree ; i++)
|
||||
format += "#";
|
||||
|
||||
DecimalFormat twoDForm = new DecimalFormat(format);
|
||||
DecimalFormatSymbols symb = new DecimalFormatSymbols(Locale.US);
|
||||
DecimalFormat twoDForm = new DecimalFormat(format, symb);
|
||||
return Double.valueOf(twoDForm.format(d));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user