Block Placer
Place blocks in any direction
Overview
The BlockPlacer
class provides a utility for programmatically placing blocks in a specified direction from a given origin location.
Methods
create
create
Creates a new BlockPlacer
instance with the specified plugin and material.
Parameters
plugin
: The JavaPlugin instance associated with the plugin.material
: The material of the block to be placed.
Returns
Returns a new instance of the
BlockPlacer
class.
setDirection
setDirection
Sets the direction in which blocks will be placed.
Parameters
direction
: The direction in which blocks will be placed. Should be one of the values defined in theDirection
enum.
Returns
Returns the updated
BlockPlacer
instance.
setLength
setLength
Sets the number of blocks to be placed in the specified direction.
Parameters
length
: The number of blocks to be placed.
Returns
Returns the updated
BlockPlacer
instance.
setHeight
setHeight
Sets the height of the block column to be placed.
Parameters
height
: The height of the block column.
Returns
Returns the updated
BlockPlacer
instance.
setDelayBetweenBlocks
setDelayBetweenBlocks
Sets the delay between placing each block in milliseconds.
Parameters
delay
: The delay between placing each block in milliseconds.
Returns
Returns the updated
BlockPlacer
instance.
build
build
Builds the block column starting from the specified origin location.
Parameters
origin
: The origin location from which to start placing blocks.
Returns
This method does not return anything.
Enums
Direction
Direction
Represents the direction in which blocks will be placed.
Example Usage
In this example, we create a BlockPlacer
instance, set its properties, and build a column of blocks starting from the specified origin location.
Last updated