package leigh.minecraft.leighco.cmd;

import leigh.mecha.cli.CommandHandler;
import leigh.minecraft.leighco.LeighCoState;
import leigh.minecraft.leighco.Location;
import leigh.minecraft.leighco.Lot;

public class PosCommand implements CommandHandler<LeighCoState> {
    @Override
    public void handle(String[] cmd, LeighCoState state) throws Exception {
        Location loc = state.getLocation();

        String sb = "Position: [x:" +
                loc.getX() +
                " y:" +
                loc.getY() +
                " z:" +
                loc.getZ() +
                "]";

        state.sendMessage(sb);

        // Just for testing

        Lot lot = new Lot(state.getLocation(), 16);
        state.sendMessage("16-size lot: " + lot);

    }
}
