Class AddOwner
java.lang.Object
nl.pim16aap2.animatedarchitecture.core.commands.BaseCommand
nl.pim16aap2.animatedarchitecture.core.commands.StructureTargetCommand
nl.pim16aap2.animatedarchitecture.core.commands.AddOwner
Represents the command that adds co-owners to a given structure.
-
Nested Class Summary
Nested classes/interfaces inherited from class nl.pim16aap2.animatedarchitecture.core.commands.StructureTargetCommand
StructureTargetCommand.StructureDescription -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CommandDefinitionprotected static final PermissionLevelThe default value to use fortargetPermissionLevelwhen none is specified.Fields 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.protected voidCalled byStructureTargetCommand.handleDatabaseActionResult(DatabaseManager.ActionResult)when the database action was successful.protected booleanChecks if execution of this command is allowed for the givenStructure.protected CompletableFuture<?> performAction(Structure structure) Performs the action of this command on theStructure.toString()protected booleanChecks if the input is valid before starting any potentially expensive tasks.Methods inherited from class nl.pim16aap2.animatedarchitecture.core.commands.StructureTargetCommand
executeCommand, getRequiredProperties, getRetrievedStructureDescription, getRetrieverResult, getStructureAttribute, getStructureRetriever, handleDatabaseActionCancelled, handleDatabaseActionFail, handleDatabaseActionResult, hasRequiredProperties, notifyMissingProperties, sendUpdatedInfo, setRetrieverResultMethods inherited from class nl.pim16aap2.animatedarchitecture.core.commands.BaseCommand
availableForNonPlayers, availableForPlayers, getCommandSender, getStructure, hasAccessToAttribute, hasPermission, run, startExecution
-
Field Details
-
COMMAND_DEFINITION
-
DEFAULT_PERMISSION_LEVEL
The default value to use fortargetPermissionLevelwhen none is specified.
-
-
Method Details
-
handleDatabaseActionSuccess
protected void handleDatabaseActionSuccess()Description copied from class:StructureTargetCommandCalled byStructureTargetCommand.handleDatabaseActionResult(DatabaseManager.ActionResult)when the database action was successful.- Overrides:
handleDatabaseActionSuccessin classStructureTargetCommand
-
getCommand
Description copied from class:BaseCommandGets theCommandDefinitionthat contains the definition of thisBaseCommand.- Specified by:
getCommandin classBaseCommand- Returns:
- The
CommandDefinitionthat contains the definition of thisBaseCommand.
-
validInput
protected boolean validInput()Description copied from class:BaseCommandChecks if the input is valid before starting any potentially expensive tasks.- Overrides:
validInputin classBaseCommand- Returns:
- True if the input is valid.
-
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.
-
isAllowed
Description copied from class:StructureTargetCommandChecks if execution of this command is allowed for the givenStructure.- Overrides:
isAllowedin classStructureTargetCommand- Parameters:
structure- TheStructurethat is the target for this command.hasBypassPermission- Whether theICommandSenderhas bypass access.- Returns:
- True if execution of this command is allowed.
-
toString
- Overrides:
toStringin classBaseCommand
-