All Downloads are FREE. Search and download functionalities are using the official Maven repository.

emu.grasscutter.command.commands.PositionCommand Maven / Gradle / Ivy

There is a newer version: 1.0.3-dev
Show newest version
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 = "position", usage = "position", aliases = {"pos"},
        description = "Get coordinates.")
public final class PositionCommand implements CommandHandler {

    @Override
    public void execute(GenshinPlayer sender, List args) {
        if (sender == null) {
            CommandHandler.sendMessage(null, "Run this command in-game.");
            return;
        }

        sender.dropMessage(String.format("Coord: %.3f, %.3f, %.3f\nScene id: %d",
                sender.getPos().getX(), sender.getPos().getY(), sender.getPos().getZ(), sender.getSceneId()));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy