PositionCommand.java 875 Bytes
Newer Older
KingRainbow44's avatar
KingRainbow44 committed
1
2
3
4
package emu.grasscutter.command.commands;

import emu.grasscutter.command.Command;
import emu.grasscutter.command.CommandHandler;
Melledy's avatar
Melledy committed
5
import emu.grasscutter.game.player.Player;
AnimeGitB's avatar
AnimeGitB committed
6
import emu.grasscutter.utils.Position;
KingRainbow44's avatar
KingRainbow44 committed
7
8
9

import java.util.List;

10
11
import static emu.grasscutter.utils.Language.translate;

Luke Hubmayer-Werner's avatar
Luke Hubmayer-Werner committed
12
@Command(label = "position", usage = "position", aliases = {"pos"}, description = "commands.position.description")
KingRainbow44's avatar
KingRainbow44 committed
13
14
15
public final class PositionCommand implements CommandHandler {

    @Override
AnimeGitB's avatar
AnimeGitB committed
16
    public void execute(Player sender, Player targetPlayer, List<String> args) {
AnimeGitB's avatar
AnimeGitB committed
17
        Position pos = targetPlayer.getPos();
Secretboy's avatar
Secretboy committed
18
        CommandHandler.sendMessage(sender, translate(sender, "commands.position.success",
19
20
                Float.toString(pos.getX()), Float.toString(pos.getY()), Float.toString(pos.getZ()),
                Integer.toString(targetPlayer.getSceneId())));
KingRainbow44's avatar
KingRainbow44 committed
21
22
    }
}