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

方块君's avatar
方块君 committed
3
import emu.grasscutter.Grasscutter;
KingRainbow44's avatar
KingRainbow44 committed
4
5
import emu.grasscutter.command.Command;
import emu.grasscutter.command.CommandHandler;
Melledy's avatar
Melledy committed
6
import emu.grasscutter.game.player.Player;
KingRainbow44's avatar
KingRainbow44 committed
7
8
9
10
11
12
13
14

import java.util.List;

@Command(label = "position", usage = "position", aliases = {"pos"},
        description = "Get coordinates.")
public final class PositionCommand implements CommandHandler {

    @Override
15
    public void execute(Player sender, List<String> args) {
KingRainbow44's avatar
KingRainbow44 committed
16
        if (sender == null) {
方块君's avatar
方块君 committed
17
            CommandHandler.sendMessage(null, Grasscutter.getLanguage().Run_this_command_in_game);
KingRainbow44's avatar
KingRainbow44 committed
18
19
20
            return;
        }

方块君's avatar
方块君 committed
21
        sender.dropMessage(String.format(Grasscutter.getLanguage().Position_message,
xtaodada's avatar
xtaodada committed
22
                sender.getPos().getX(), sender.getPos().getY(), sender.getPos().getZ(), sender.getSceneId()));
KingRainbow44's avatar
KingRainbow44 committed
23
24
    }
}