Class DelayedCommandInputRequest<T>
java.lang.Object
nl.pim16aap2.animatedarchitecture.core.util.delayedinput.DelayedInputRequest<T>
nl.pim16aap2.animatedarchitecture.core.commands.DelayedCommandInputRequest<T>
- Type Parameters:
T- The type of data that is to be retrieved from the player.
Represents a request for delayed additional input for a command.
Taking the AddOwner command as an example, it could be initialized using a GUI, in which case it is known who
the ICommandSender is and what the target Structure is. However, for some GUIs (e.g. Spigot),
it is not yet known who the target player is and what the desired permission level is. This class can then be used to
retrieve the additional data that is required to execute the command.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class nl.pim16aap2.animatedarchitecture.core.util.delayedinput.DelayedInputRequest
DelayedInputRequest.Status -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected voidcleanup()Runs after the request has closed.booleanprotected CompletableFuture<?> The output of the command.inthashCode()Provides the input object as input for this input request.toString()Methods inherited from class nl.pim16aap2.animatedarchitecture.core.util.delayedinput.DelayedInputRequest
cancel, cancelled, completed, exceptionally, getInputResult, getStatus, set, success, timedOut
-
Method Details
-
provide
Provides the input object as input for this input request. SeeDelayedInputRequest.set(Object).If the provided input is not of the correct type as defined by
inputClass, a future containing a false boolean is returned to indicate incorrect command usage.- Parameters:
input- The input object to provide.- Returns:
- When the input is of the correct type,
commandOutputis returned, otherwise false.
-
cleanup
protected void cleanup()Description copied from class:DelayedInputRequestRuns after the request has closed. Either because input was provided or because the request timed out.- Overrides:
cleanupin classDelayedInputRequest<T>
-
toString
- Overrides:
toStringin classDelayedInputRequest<T>
-
equals
- Overrides:
equalsin classDelayedInputRequest<T>
-
canEqual
- Overrides:
canEqualin classDelayedInputRequest<T>
-
hashCode
public int hashCode()- Overrides:
hashCodein classDelayedInputRequest<T>
-
getCommandOutput
The output of the command. SeeBaseCommand.run().
-