Class AddOwnerDelayed
java.lang.Object
nl.pim16aap2.animatedarchitecture.core.commands.DelayedCommand<AddOwnerDelayed.DelayedInput>
nl.pim16aap2.animatedarchitecture.core.commands.AddOwnerDelayed
Delayed version of
AddOwner.
This command is used to add a player as a co-owner to a structure.
The target player and the permission level of the new owner's ownership can be provided as delayed input.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents the data that can be provided as delayed input for this command.Nested classes/interfaces inherited from class DelayedCommand
DelayedCommand.Context -
Field Summary
Fields inherited from class DelayedCommand
commandFactory, delayedCommandInputManager, inputRequestFactory -
Method Summary
Modifier and TypeMethodDescriptionprotected CompletableFuture<?> delayedInputExecutor(ICommandSender commandSender, StructureRetriever structureRetriever, AddOwnerDelayed.DelayedInput delayedInput) The method that is run once delayed input is received.protected CommandDefinitionGets the command definition for this delayed command.protected StringinputRequestMessage(ICommandSender commandSender, StructureRetriever structureRetriever) Retrieves the message that will be sent to the command sender after initialization of a delayed input request.@NonNull StringtoString()Methods inherited from class DelayedCommand
provideDelayedInput, runDelayed, runDelayed
-
Method Details
-
getCommandDefinition
Description copied from class:DelayedCommandGets the command definition for this delayed command.- Specified by:
getCommandDefinitionin classDelayedCommand<AddOwnerDelayed.DelayedInput>- Returns:
- The command definition.
-
delayedInputExecutor
protected CompletableFuture<?> delayedInputExecutor(ICommandSender commandSender, StructureRetriever structureRetriever, AddOwnerDelayed.DelayedInput delayedInput) 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<AddOwnerDelayed.DelayedInput>- 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.delayedInput- 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<AddOwnerDelayed.DelayedInput>- 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.
-
toString
- Overrides:
toStringin classDelayedCommand<AddOwnerDelayed.DelayedInput>
-