BlockCreateContext

Information surrounding a block place event.

Inheritors

Types

Link copied to clipboard
data class Default @JvmOverloads constructor(val block: Block, val facing: BlockFace = BlockFace.NORTH, val facingVertical: BlockFace = BlockFace.NORTH, val item: ItemStack? = null, val shouldSetType: Boolean = true) : Record, BlockCreateContext

A context in which no other reason is specified

Link copied to clipboard
data class ManualLoading @JvmOverloads constructor(val block: Block, val facing: BlockFace = BlockFace.NORTH, val facingVertical: BlockFace = BlockFace.NORTH, val item: ItemStack? = null, val shouldSetType: Boolean = true) : Record, BlockCreateContext
Link copied to clipboard
data class PlayerPlace(val player: Player, val item: ItemStack, val event: BlockPlaceEvent) : BlockCreateContext

A player has placed the block

Link copied to clipboard
data class PluginGenerate(val plugin: Plugin, val facing: BlockFace = BlockFace.NORTH, val facingVertical: BlockFace = BlockFace.NORTH, val block: Block, val item: ItemStack) : Record, BlockCreateContext

A plugin generated the block ex:

Properties

Link copied to clipboard
abstract val block: Block

The old block where the new block is about to be created.

Link copied to clipboard
abstract val facing: BlockFace

The direction in which this block was placed. NORTH, EAST, SOUTH, WEST.

Link copied to clipboard

The direction in which this block was placed. NORTH, EAST, SOUTH, WEST, UP, DOWN

Link copied to clipboard
abstract val item: ItemStack?

The item used to create the block, if applicable.

Link copied to clipboard
@get:JvmName(name = "shouldSetType")
open val shouldSetType: Boolean

If true, the type of the block will be set to the type of the Rebar block