Class SetOpenStatus
java.lang.Object
nl.pim16aap2.animatedarchitecture.core.commands.BaseCommand
nl.pim16aap2.animatedarchitecture.core.commands.StructureTargetCommand
nl.pim16aap2.animatedarchitecture.core.commands.SetOpenStatus
Represents the command that changes the opening status of structures.
-
Nested Class Summary
Nested classes/interfaces inherited from class nl.pim16aap2.animatedarchitecture.core.commands.StructureTargetCommand
StructureTargetCommand.StructureDescription -
Field Summary
FieldsFields inherited from class nl.pim16aap2.animatedarchitecture.core.commands.StructureTargetCommand
structureAttribute, structureRetrieverFields inherited from class nl.pim16aap2.animatedarchitecture.core.commands.BaseCommand
localizer, textFactory -
Method Summary
Modifier and TypeMethodDescriptionGets theCommandDefinitionthat contains the definition of thisBaseCommand.Gets all required properties for this command.protected voidCalled byStructureTargetCommand.handleDatabaseActionResult(DatabaseManager.ActionResult)when the database action was successful.protected voidnotifyMissingProperties(Structure structure) Notifies theICommandSenderthat the targetedStructureis missing required properties.protected CompletableFuture<?> performAction(Structure structure) Performs the action of this command on theStructure.toString()Methods inherited from class nl.pim16aap2.animatedarchitecture.core.commands.StructureTargetCommand
executeCommand, getRetrievedStructureDescription, getRetrieverResult, getStructureAttribute, getStructureRetriever, handleDatabaseActionCancelled, handleDatabaseActionFail, handleDatabaseActionResult, hasRequiredProperties, isAllowed, sendUpdatedInfo, setRetrieverResultMethods inherited from class nl.pim16aap2.animatedarchitecture.core.commands.BaseCommand
availableForNonPlayers, availableForPlayers, getCommandSender, getStructure, hasAccessToAttribute, hasPermission, run, startExecution, validInput
-
Field Details
-
COMMAND_DEFINITION
-
-
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.
-
handleDatabaseActionSuccess
protected void handleDatabaseActionSuccess()Description copied from class:StructureTargetCommandCalled byStructureTargetCommand.handleDatabaseActionResult(DatabaseManager.ActionResult)when the database action was successful.- Overrides:
handleDatabaseActionSuccessin classStructureTargetCommand
-
notifyMissingProperties
Description copied from class:StructureTargetCommandNotifies theICommandSenderthat the targetedStructureis missing required properties.- Overrides:
notifyMissingPropertiesin classStructureTargetCommand- Parameters:
structure- TheStructurethat is missing the required properties.
-
performAction
Description copied from class:StructureTargetCommandPerforms the action of this command on theStructure.- Specified by:
performActionin classStructureTargetCommand- Parameters:
structure- TheStructureto perform the action on.- Returns:
- The future of the command execution.
-
getRequiredProperties
Description copied from class:StructureTargetCommandGets all required properties for this command.If targeted structure does not have all required properties, the command will not be executed.
By default, this returns an empty list. Subclasses that require specific properties should override this method.
- Overrides:
getRequiredPropertiesin classStructureTargetCommand- Returns:
- A list of all required properties.
-
toString
- Overrides:
toStringin classBaseCommand
-