breakBlock

fun breakBlock(blockPosition: BlockPosition, context: BlockBreakContext = BlockBreakContext.PluginBreak(blockPosition.block)): List<Item>?(source)

Removes a Rebar block and breaks the physical block in the world. Does nothing if the block is not a Rebar block. Only call on the main thread.

Return

The items that were dropped by the block being broken

Throws

if the chunk of the given blockPosition is not loaded.


fun breakBlock(block: Block, context: BlockBreakContext = BlockBreakContext.PluginBreak(block)): List<Item>?(source)
fun breakBlock(block: RebarBlock, context: BlockBreakContext = BlockBreakContext.PluginBreak(block.block)): List<Item>?(source)

Removes a Rebar block and breaks the physical block in the world. Does nothing if the block is not a Rebar block. Only call on the main thread.

Return

The items that were dropped by the block being broken

Throws

if the chunk of the given block is not loaded.


fun breakBlock(location: Location, context: BlockBreakContext = BlockBreakContext.PluginBreak(location.block)): List<Item>?(source)

Removes a Rebar block and breaks the physical block in the world. Does nothing if the block is not a Rebar block. Only call on the main thread.

Return

The items that were dropped by the block being broken

Throws

if the chunk of the given location is not loaded.