forked from gaucho-matrero/altoclef
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a command for the GetToXZWithElytraTask, and removed the elytra…
- Loading branch information
1 parent
c997e24
commit 2c22f6e
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
src/main/java/adris/altoclef/commands/GotoWithElytraCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |