ListenerCommand

public ListenerCommand ListenerCommand(Command command, Runnable onInit, Runnable onExecute, Consumer<Boolean> onEnd)
public ListenerCommand ListenerCommand(Command command, Runnable onInit, Runnable onExecute)

Parameters

command

the command to be run.

onInit

the action to run when this command initializes.

onExecute

the action to run whenever this command updates.

onEnd

the action to run when this command is ended. Takes in whether it was interrupted as a parameter.