Fixed teleports not working on some systems (fixes #491)

This commit is contained in:
Intelli 2024-02-07 12:49:36 -07:00
parent af1d4402eb
commit a239b51ed1
1 changed files with 3 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
@ -126,7 +127,8 @@ public class Util extends Queue {
}
// command
message.append("|/" + command + " teleport wid:" + worldId + " " + String.format("%.2f", (x + 0.50)) + " " + y + " " + String.format("%.2f", (z + 0.50)) + "|");
DecimalFormat decimalFormat = new DecimalFormat("#.##", new DecimalFormatSymbols(Locale.ROOT));
message.append("|/" + command + " teleport wid:" + worldId + " " + decimalFormat.format(x + 0.50) + " " + y + " " + decimalFormat.format(z + 0.50) + "|");
// chat output
message.append(Color.GREY + (italic ? Color.ITALIC : "") + "(x" + x + "/y" + y + "/z" + z + worldDisplay.toString() + ")");