Package nl.pim16aap2.animatedarchitecture.core.commands
@NullMarked
package nl.pim16aap2.animatedarchitecture.core.commands
This package contains command definitions and command factories used by this project, as well as various base command
classes and interfaces.
Construction of new commands is handled by the
CommandFactory, when can be obtained using
IAnimatedArchitecturePlatform.getCommandFactory().
A command is not executed directly when it is created. To execute a command, you must call
BaseCommand.run() on it. For example:
public void setBlocksToMove(
CommandFactory commandFactory, ICommandSender commandSender, StructureRetriever retriever, int blocksToMove)
{
commandFactory
.newSetBlocksToMove(commandSender, retriever, blocksToMove)
.run()
.exceptionally(ex -> ...);
}
For situations where not all required data is available, the 'Delayed' version of the command can be used. For
example, when a player selects the option to change the 'blocksToMove' value of a portcullis in the GUI. In this
situation, you only know the target structure, but not yet the new 'blocksToMove' value. The
SetBlocksToMoveDelayed command can then be used to request
the player to specify the new value.
For example:
public void setBlocksToMoveDelayed(
CommandFactory commandFactory, ICommandSender commandSender, StructureRetriever retriever)
{
commandFactory
.getSetBlocksToMoveDelayed()
.runDelayed(commandSender, retriever)
.exceptionally(ex -> ...);
}-
ClassDescriptionRepresents the command that adds co-owners to a given structure.Delayed version of
AddOwner.Represents the data that can be provided as delayed input for this command.Represents the base AnimatedArchitecture command.Represents the cancel command, which cancels any processes waiting for user input (e.g. structure creation).Represents the various commands that are used along with their user/admin permission nodes.Represents a factory for commands.Represents the confirm command, which is used to confirm actions AnimatedArchitecture is waiting on.Represents the debug command.Represents a delayed command.Provides context for creating delayed commands with all required dependencies.Represents a request for delayed additional input for a command.The factory interface for creatingDelayedCommandInputRequestinstances.Represents the command that is used to delete structures.Represents a command sender.Represents the information command that provides the issuer with more information about the structure.Represents the command to inspect a location to check if there are any powerblocks registered there.Represents the server as anICommandSenderRepresents a command to list a number of structures matching a singleStructureRetrieverFactory.Represents the command that is used to change whether a structure is locked.Represents the menu command, which is used to open the menu for a user.Represents the command to initiate the process to move the powerblock of a structure to a different location.Represents the command that is used to create new structures.Represents a pair of booleans that determine whether a user has user-level and/or admin-level permission access to some kind of action.Represents the remove owner command.Delayed version ofRemoveOwner.Represents the command that is used to restart AnimatedArchitecture.Represents the command that is used to change the number of blocks a block will try to move.Delayed version ofSetBlocksToMove.Represents the setName command, which is used to provide a name for aToolUser.Represents the command that changes the opening direction of structures.Delayed version ofSetOpenDirection.Represents the command that changes the opening status of structures.Delayed version ofSetOpenStatus.Represents the command that sets property values for structures.Implements the command to specify a structure for theStructureSpecificationManager.Represents the command used to stop all active structures.Represents a command that relates to an existing structure.A simple description of a structure.Represents a command that is used to update activeCreatorprocesses with arbitrary data in out-of-procedure order.The factory interface for creatingUpdateCreatorcommands.Represents the command that shows theICommandSenderthe current version of the plugin that is running.