Class Specify
java.lang.Object
nl.pim16aap2.animatedarchitecture.core.commands.BaseCommand
nl.pim16aap2.animatedarchitecture.core.commands.Specify
Implements the command to specify a structure for the
StructureSpecificationManager.
For example, when a player wants to perform an action on a structure, but multiple structures fit the criteria. The Specify command is then used to specify which structure the player wants to perform the action on.
The specify command takes a String as input, which is then used to specify the structure. See
StructureSpecificationManager.handleInput(IPlayer, String).
-
Field Summary
Fields inherited from class nl.pim16aap2.animatedarchitecture.core.commands.BaseCommand
localizer, textFactory -
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.toString()Methods inherited from class nl.pim16aap2.animatedarchitecture.core.commands.BaseCommand
availableForPlayers, getCommandSender, getStructure, hasAccessToAttribute, hasPermission, run, startExecution, validInput
-
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.validInput()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
-