Skip to content

Commit

Permalink
Fixed teleports not working on some systems (fixes #491)
Browse files Browse the repository at this point in the history
  • Loading branch information
Intelli committed Feb 7, 2024
1 parent af1d440 commit a239b51
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/net/coreprotect/utility/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
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;
Expand Down Expand Up @@ -126,7 +127,8 @@ public static String getCoordinates(String command, int worldId, int x, int y, i
}

// 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() + ")");
Expand Down

0 comments on commit a239b51

Please sign in to comment.