Skip to content

Commit

Permalink
added @dummy command for testing purposes
Browse files Browse the repository at this point in the history
  • Loading branch information
MiranCZ committed Apr 15, 2024
1 parent 31a74ab commit e41cea0
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/adris/altoclef/AltoClefCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import adris.altoclef.commands.*;
import adris.altoclef.commands.random.CycleTestCommand;
import adris.altoclef.commands.random.DummyTaskCommand;
import adris.altoclef.commands.random.ScanCommand;
import adris.altoclef.commandsystem.CommandException;

Expand All @@ -20,6 +21,7 @@ public static void init() throws CommandException {
new TestCommand(),
new GamerCommand(),
new MarvionCommand(),
new DummyTaskCommand(),
new ReloadSettingsCommand(),
//new CycleTestCommand(),
new ScanCommand()
Expand Down
48 changes: 48 additions & 0 deletions src/main/java/adris/altoclef/commands/random/DummyTaskCommand.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package adris.altoclef.commands.random;

import adris.altoclef.AltoClef;
import adris.altoclef.commandsystem.ArgBase;
import adris.altoclef.commandsystem.ArgParser;
import adris.altoclef.commandsystem.Command;
import adris.altoclef.commandsystem.CommandException;
import adris.altoclef.tasks.speedrun.OneCycleTask;
import adris.altoclef.tasksystem.Task;

public class DummyTaskCommand extends Command {
public DummyTaskCommand() {
super("dummy", "Doesnt do anything");
}

@Override
protected void call(AltoClef mod, ArgParser parser) throws CommandException {
mod.runUserTask(new DummyTask(), this::finish);
}

private class DummyTask extends Task {

@Override
protected void onStart(AltoClef mod) {

}

@Override
protected Task onTick(AltoClef mod) {
return null;
}

@Override
protected void onStop(AltoClef mod, Task interruptTask) {

}

@Override
protected boolean isEqual(Task other) {
return false;
}

@Override
protected String toDebugString() {
return null;
}
}
}

0 comments on commit e41cea0

Please sign in to comment.