Class Confirm
java.lang.Object
nl.pim16aap2.animatedarchitecture.core.commands.BaseCommand
nl.pim16aap2.animatedarchitecture.core.commands.Confirm
Represents the confirm command, which is used to confirm actions AnimatedArchitecture is waiting on.
For example, when buying something, the process might require the user to confirm that they agree to the transaction.
-
Field Summary
Fields inherited from class BaseCommand
executor, localizer -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanChecks if thisBaseCommandis available for non-IPlayers (e.g. the server).protected CompletableFuture<?> executeCommand(PermissionsStatus permissions) Executes the command.Gets theCommandDefinitionthat contains the definition of thisBaseCommand.@NonNull StringtoString()Methods inherited from class BaseCommand
availableForPlayers, getCommandSender, getStructure, hasAccessToAttribute, hasPermission, run, runWithRawResult, runWithRawResult, sendGenericErrorMessage, startExecution, validateInput
-
Method Details
-
getCommand
Description copied from class:BaseCommandGets theCommandDefinitionthat contains the definition of thisBaseCommand.- Specified by:
getCommandin classBaseCommand- Returns:
- The
CommandDefinitionthat contains the definition of thisBaseCommand.
-
availableForNonPlayers
protected boolean availableForNonPlayers()Description copied from class:BaseCommandChecks if thisBaseCommandis available for non-IPlayers (e.g. the server).- Overrides:
availableForNonPlayersin classBaseCommand- Returns:
- True if a non-
IPlayercan execute this command.
-
executeCommand
Description copied from class:BaseCommandExecutes the command. This method is only called ifBaseCommand.validateInput()andBaseCommand.hasPermission()are true.Note that this method is called asynchronously.
- Specified by:
executeCommandin classBaseCommand- Parameters:
permissions- Whether theICommandSenderhas user and/or admin permissions.- Returns:
- The future of the command execution.
-
toString
- Overrides:
toStringin classBaseCommand
-