2022-04-21 06:48:24 +08:00
|
|
|
package emu.grasscutter.command.commands;
|
|
|
|
|
2022-05-03 14:23:25 +08:00
|
|
|
import emu.grasscutter.Grasscutter;
|
2022-04-21 06:48:24 +08:00
|
|
|
import emu.grasscutter.command.Command;
|
|
|
|
import emu.grasscutter.command.CommandHandler;
|
2022-04-27 12:24:25 +08:00
|
|
|
import emu.grasscutter.game.player.Player;
|
2022-04-21 06:48:24 +08:00
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
@Command(label = "position", usage = "position", aliases = {"pos"},
|
|
|
|
description = "Get coordinates.")
|
|
|
|
public final class PositionCommand implements CommandHandler {
|
|
|
|
|
|
|
|
@Override
|
2022-04-27 12:21:57 +08:00
|
|
|
public void execute(Player sender, List<String> args) {
|
2022-04-21 06:48:24 +08:00
|
|
|
if (sender == null) {
|
2022-05-03 14:23:25 +08:00
|
|
|
CommandHandler.sendMessage(null, Grasscutter.getLanguage().Run_this_command_in_game);
|
2022-04-21 06:48:24 +08:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2022-05-03 14:23:25 +08:00
|
|
|
sender.dropMessage(String.format(Grasscutter.getLanguage().Position_message,
|
2022-04-24 03:10:07 +08:00
|
|
|
sender.getPos().getX(), sender.getPos().getY(), sender.getPos().getZ(), sender.getSceneId()));
|
2022-04-21 06:48:24 +08:00
|
|
|
}
|
|
|
|
}
|