block

you get a block value from events like PlayerInteract, BlockBreak, BlockPlace, ProjectileHit, and BlockExplode


properties

block.type //block type
block.location //block location object
block.world //block world
block.x //the x-coordinate of this block
block.y //the y-coordinate of this block
block.z //the z-coordinate of this block

methods

block.setType(material)

setType

sets the block to a target material

block.setType(material)
parameter default description
material required case insensitive vanilla block material name string

example

block.setType("glass") // sets the block to glass