Class NewStructure
java.lang.Object
nl.pim16aap2.animatedarchitecture.core.commands.BaseCommand
nl.pim16aap2.animatedarchitecture.core.commands.NewStructure
Represents the command that is used to create new structures.
-
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.protected CompletableFuture<PermissionsStatus> Checks if theICommandSenderhas the required permissions to use this command.toString()Methods inherited from class nl.pim16aap2.animatedarchitecture.core.commands.BaseCommand
availableForPlayers, getCommandSender, getStructure, hasAccessToAttribute, run, startExecution, validInput
-
Method Details
-
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.
-
getCommand
Description copied from class:BaseCommandGets theCommandDefinitionthat contains the definition of thisBaseCommand.- Specified by:
getCommandin classBaseCommand- Returns:
- The
CommandDefinitionthat contains the definition of thisBaseCommand.
-
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.
-
hasPermission
Description copied from class:BaseCommandChecks if theICommandSenderhas the required permissions to use this command. SeeCommandDefinition.getUserPermission()andCommandDefinition.getAdminPermission().- Overrides:
hasPermissionin classBaseCommand- Returns:
- A pair of booleans that indicates whether the user has access to the user and admin permission nodes respectively. For both, true indicates that they do have access to the node and false that they do not.
-
toString
- Overrides:
toStringin classBaseCommand
-