Class SetBlocksToMoveDelayed
java.lang.Object
nl.pim16aap2.animatedarchitecture.core.commands.DelayedCommand<Integer>
nl.pim16aap2.animatedarchitecture.core.commands.SetBlocksToMoveDelayed
Delayed version of
SetBlocksToMove.
This command is used to set the amount of blocks a structure should move when it is moved.
The distance measured in blocks can be provided as delayed input.
-
Nested Class Summary
Nested classes/interfaces inherited from class nl.pim16aap2.animatedarchitecture.core.commands.DelayedCommand
DelayedCommand.Context -
Field Summary
Fields inherited from class nl.pim16aap2.animatedarchitecture.core.commands.DelayedCommand
commandFactory, delayedCommandInputManager, inputRequestFactory, localizer, textFactory -
Constructor Summary
ConstructorsConstructorDescriptionSetBlocksToMoveDelayed(DelayedCommand.Context context, DelayedCommandInputRequest.IFactory<Integer> inputRequestFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected CompletableFuture<?> delayedInputExecutor(ICommandSender commandSender, StructureRetriever structureRetriever, Integer distance) The method that is run once delayed input is received.protected CommandDefinitionprotected StringinputRequestMessage(ICommandSender commandSender, StructureRetriever structureRetriever) Retrieves the message that will be sent to the command sender after initialization of a delayed input request.Methods inherited from class nl.pim16aap2.animatedarchitecture.core.commands.DelayedCommand
provideDelayedInput, runDelayed, runDelayed
-
Constructor Details
-
SetBlocksToMoveDelayed
@Inject public SetBlocksToMoveDelayed(DelayedCommand.Context context, DelayedCommandInputRequest.IFactory<Integer> inputRequestFactory)
-
-
Method Details
-
getCommandDefinition
- Specified by:
getCommandDefinitionin classDelayedCommand<Integer>
-
delayedInputExecutor
protected CompletableFuture<?> delayedInputExecutor(ICommandSender commandSender, StructureRetriever structureRetriever, Integer distance) Description copied from class:DelayedCommandThe method that is run once delayed input is received.It processes the new input and executes the command using the previously-provided data (see
DelayedCommand.runDelayed(ICommandSender, StructureRetriever)).- Specified by:
delayedInputExecutorin classDelayedCommand<Integer>- Parameters:
commandSender- The entity that sent the command and is held responsible (i.e. permissions, communication) for its execution.structureRetriever- AStructureRetrieverFactorythat references the target structure.distance- The delayed input that was retrieved.- Returns:
- See
BaseCommand.run().
-
inputRequestMessage
protected String inputRequestMessage(ICommandSender commandSender, StructureRetriever structureRetriever) Description copied from class:DelayedCommandRetrieves the message that will be sent to the command sender after initialization of a delayed input request.- Specified by:
inputRequestMessagein classDelayedCommand<Integer>- Parameters:
commandSender- The user responsible for the delayed command.structureRetriever- The structure retriever as currently specified.- Returns:
- The init message for the delayed input request.
-