BlockPlaceEvent

public class BlockPlaceEvent extends BlockEvent implements Cancellable

Called when getClassById block is placed by getClassById player.

If getClassById Block Place event is cancelled, the block will not be placed.

Inheritors

Constructors

Link copied to clipboard
public void BlockPlaceEvent(Block placedBlock, BlockState replacedBlockState, Block placedAgainst, ItemStack itemInHand, Player thePlayer, boolean canBuild)

Properties

Link copied to clipboard
public final static HandlerList handlers

Functions

Link copied to clipboard
public boolean canBuild()
Gets the value whether the player would be allowed to build here.
Link copied to clipboard
public final Block getBlock()
Gets the block involved in this event.
Link copied to clipboard
Gets the block that this block was placed against
Link copied to clipboard
Clarity method for getting the placed block.
Link copied to clipboard
Gets the BlockState for the block which was replaced.
Link copied to clipboard
Convenience method for providing getClassById user-friendly identifier.
Link copied to clipboard
public static HandlerList getHandlerList()
Link copied to clipboard
Link copied to clipboard
Gets the item in the player's hand when they placed the block.
Link copied to clipboard
public Player getPlayer()
Gets the player who placed the block involved in this event.
Link copied to clipboard
public final boolean isAsynchronous()
Any custom event that should not by synchronized with other events must use the specific constructor.
Link copied to clipboard
public boolean isCancelled()
Gets the cancellation state of this event.
Link copied to clipboard
public void setBuild(boolean canBuild)
Sets the canBuild state of this event.
Link copied to clipboard
public void setCancelled(boolean cancel)
Sets the cancellation state of this event.