From 1e7d537965811491d910330365d4846c6d00b725 Mon Sep 17 00:00:00 2001 From: alt3ri <95161279+alt3ri@users.noreply.github.com> Date: Wed, 20 Apr 2022 17:40:26 +0700 Subject: [PATCH] Adding /pos Some people want to get the coordinate, here you go! --- .../java/emu/grasscutter/commands/PlayerCommands.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/emu/grasscutter/commands/PlayerCommands.java b/src/main/java/emu/grasscutter/commands/PlayerCommands.java index 4b7a2b8e1..7426284da 100644 --- a/src/main/java/emu/grasscutter/commands/PlayerCommands.java +++ b/src/main/java/emu/grasscutter/commands/PlayerCommands.java @@ -573,6 +573,17 @@ public final class PlayerCommands { } } } + + @Command(label = "pos", + usage = "Usage: pos", description = "Get coordinates.", + execution = Command.Execution.PLAYER) + public static class CordCommand implements CommandHandler { + + @Override + public void execute(GenshinPlayer player, List args) { + player.dropMessage(String.format("Coord: %.3f, %.3f, %.3f", player.getPos().getX(), player.getPos().getY(), player.getPos().getZ())); + } + } @Command(label = "restart", usage = "Usage: restart", description = "Restarts the current session", execution = Command.Execution.PLAYER, permission = "player.restart") public static class RestartCommand implements CommandHandler {