Skip to content

Commit 7def372

Browse files
committed
Add the ability to teleport to chunk coordinates by using "!"
1 parent 3494fc1 commit 7def372

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/com/sk89q/commandbook/util/InputUtil.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,10 @@ public static class LocationParser {
433433
*/
434434
public static double parseCoordinateValue(String string) {
435435
string = string.replace("~", "");
436+
int scalingFactor = string.startsWith("!") ? 16 : 1;
437+
string = string.replace("!", "");
436438
string = string.replace(",", "");
437-
return Double.parseDouble(string);
439+
return Double.parseDouble(string) * scalingFactor;
438440
}
439441

440442
/**

0 commit comments

Comments
 (0)