Class RemoveOwner
java.lang.Object
nl.pim16aap2.animatedarchitecture.core.commands.BaseCommand
nl.pim16aap2.animatedarchitecture.core.commands.StructureTargetCommand
nl.pim16aap2.animatedarchitecture.core.commands.RemoveOwner
Represents the remove owner command. This command is used to remove owners from a structure.
-
Nested Class Summary
Nested classes/interfaces inherited from class StructureTargetCommand
StructureTargetCommand.StructureDescription -
Field Summary
FieldsFields inherited from class StructureTargetCommand
structureAttribute, structureRetrieverFields inherited from class BaseCommand
executor, localizer -
Method Summary
Modifier and TypeMethodDescriptionGets theCommandDefinitionthat contains the definition of thisBaseCommand.protected voidhandleDatabaseActionSuccess(@Nullable Structure retrieverResult) Called byStructureTargetCommand.handleDatabaseActionResult(DatabaseManager.ActionResult, Structure)when the database action was successful.protected voidChecks if execution of this command is allowed for the givenStructure.protected CompletableFuture<?> performAction(Structure structure) Performs the action of this command on theStructure.@NonNull StringtoString()Methods inherited from class StructureTargetCommand
executeCommand, getRequiredProperties, getRetrievedStructureDescription, getRetrievedStructureDescription, getRetrieverResult, getStructureAttribute, getStructureRetriever, handleDatabaseActionCancelled, handleDatabaseActionFail, handleDatabaseActionResult, hasRequiredProperties, notifyMissingProperties, sendUpdatedInfoMethods inherited from class BaseCommand
availableForNonPlayers, availableForPlayers, getCommandSender, getStructure, hasAccessToAttribute, hasPermission, run, runWithRawResult, runWithRawResult, sendGenericErrorMessage, startExecution, validateInput
-
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
Description copied from class:StructureTargetCommandCalled byStructureTargetCommand.handleDatabaseActionResult(DatabaseManager.ActionResult, Structure)when the database action was successful.- Overrides:
handleDatabaseActionSuccessin classStructureTargetCommand
-
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.If it is not allowed, an exception will be thrown.
- Overrides:
isAllowedin classStructureTargetCommand- Parameters:
structure- TheStructurethat is the target for this command.hasBypassPermission- Whether theICommandSenderhas bypass access.
-
toString
- Overrides:
toStringin classStructureTargetCommand
-