Skip to content

Commit

Permalink
Fixed teleport shortcut not properly handling extremely large numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
Intelli committed Jan 5, 2024
1 parent ba6a55f commit 7424037
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/net/coreprotect/utility/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public static String getCoordinates(String command, int worldId, int x, int y, i
}

// command
message.append("|/" + command + " teleport wid:" + worldId + " " + (x + 0.50) + " " + y + " " + (z + 0.50) + "|");
message.append("|/" + command + " teleport wid:" + worldId + " " + String.format("%.2f", (x + 0.50)) + " " + y + " " + String.format("%.2f", (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 7424037

Please sign in to comment.