Denizen Script Commands


Commands are always written with a '-' before them, and are the core component of any script, the primary way to cause things to happen.
Learn about how commands work in The Beginner's Guide.


Showing 1 out of 183 commands...
NameModifyBlock
Syntaxmodifyblock [<location>|.../<ellipsoid>/<cuboid>] [<material>|...] (no_physics/naturally:<tool>) (delayed) (<script>) (<percent chance>|...) (source:<player>) (max_delay_ms:<#>)
Short DescriptionModifies blocks.
Full DescriptionChanges blocks in the world based on the criteria given.

Use 'no_physics' to place the blocks without physics taking over the modified blocks.
This is useful for block types such as portals or water. This does NOT control physics for an extended period of time.

Specify (<percent chance>|...) to give a chance of each material being placed (in any material at all).

Use 'naturally:' when setting a block to air to break it naturally, meaning that it will drop items. Specify the tool item that should be used for calculating drops.

Use 'delayed' to make the modifyblock slowly edit blocks at a time pace roughly equivalent to the server's limits.
Optionally, specify 'max_delay_ms' to control how many milliseconds the 'delayed' set can run for in any given tick (defaults to 50).

Note that specifying a list of locations will take more time in parsing than in the actual block modification.

Optionally, specify a script to be ran after the delayed edits finish. (Doesn't fire if delayed is not set.)

Optionally, specify a source player. When set, Bukkit events will fire that identify that player as the source of a change, and potentially cancel the change.
The source argument might cause weird interoperation with other plugins, use with caution.

The modifyblock command is ~waitable. Refer to Language:~waitable.
Related Tags<LocationTag.material> Returns the material of the block at the location.
Usage Example
#Use to change the block a player is looking at to stone.
- modifyblock <player.cursor_on> stone
Usage Example
#Use to modify an entire cuboid to half stone, half dirt.
- modifyblock <player.location.to_cuboid[<player.cursor_on>]> stone|dirt
Usage Example
#Use to modify an entire cuboid to some stone, some dirt, and some left as it is.
- modifyblock <player.location.to_cuboid[<player.cursor_on>]> stone|dirt 25|25
Usage Example
#Use to modify the ground beneath the player's feet.
- modifyblock <player.location.add[2,-1,2].to_cuboid[<player.location.add[-2,-1,-2]>]> RED_WOOL
Synonyms (Search Aid)setblock, changeblock, placeblock, breakblock
Groupworld
Sourcehttps://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/world/ModifyBlockCommand.java#L62