Skip to content

Commit

Permalink
Added a command for the GetToXZWithElytraTask, and removed the elytra…
Browse files Browse the repository at this point in the history
  • Loading branch information
omnivoyant authored Jun 24, 2022
1 parent c997e24 commit 2c22f6e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/main/java/adris/altoclef/commands/GotoWithElytraCommand.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package adris.altoclef.commands;

import adris.altoclef.AltoClef;
import adris.altoclef.commandsystem.Arg;
import adris.altoclef.commandsystem.ArgParser;
import adris.altoclef.commandsystem.Command;
import adris.altoclef.commandsystem.CommandException;
import adris.altoclef.tasks.movement.GetToXZWithElytraTask;

public class GotoWithElytraCommand extends Command {
public GotoWithElytraCommand() throws CommandException {
super("elytra", "Tell bot to travel to a set of coordinates using Elytra", new Arg(Integer.class, "x"), new Arg(Integer.class, "z"));
}

@Override
protected void call(AltoClef mod, ArgParser parser) throws CommandException {
int x = parser.get(Integer.class);
int z = parser.get(Integer.class);
mod.runUserTask(new GetToXZWithElytraTask(x,z), this::finish);
}
}

0 comments on commit 2c22f6e

Please sign in to comment.