Grasscutter/src/main/java/emu/grasscutter/command/commands/PositionCommand.java

25 lines
845 B
Java
Raw Normal View History

2022-04-21 06:48:24 +08:00
package emu.grasscutter.command.commands;
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
public void execute(Player sender, List<String> args) {
2022-04-21 06:48:24 +08:00
if (sender == null) {
CommandHandler.sendMessage(null, Grasscutter.getLanguage().Run_this_command_in_game);
2022-04-21 06:48:24 +08:00
return;
}
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
}
}