mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-12-18 01:21:12 +00:00
Add pos command
Signed-off-by: Jaida Wu <mlgmxyysd@meowcat.org>
This commit is contained in:
parent
87c7fba2d2
commit
f898795c11
22
src/main/java/emu/grasscutter/command/commands/Pos.java
Normal file
22
src/main/java/emu/grasscutter/command/commands/Pos.java
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
package emu.grasscutter.command.commands;
|
||||||
|
|
||||||
|
import emu.grasscutter.command.Command;
|
||||||
|
import emu.grasscutter.command.CommandHandler;
|
||||||
|
import emu.grasscutter.game.GenshinPlayer;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Command(label = "pos",
|
||||||
|
usage = "Usage: pos", description = "Get coordinates.")
|
||||||
|
public class Pos implements CommandHandler {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCommand(GenshinPlayer sender, List<String> args) {
|
||||||
|
if (sender == null) {
|
||||||
|
CommandHandler.sendMessage(null, "Run this command in-game.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
sender.dropMessage(String.format("Coord: %.3f, %.3f, %.3f", sender.getPos().getX(), sender.getPos().getY(), sender.getPos().getZ()));
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user