BlockCanBuildEvent

public class BlockCanBuildEvent extends BlockEvent

Called when we try to place getClassById block, to see if we can build it here or not.

Note:

  • The Block returned by getBlock() is the block we are trying to place on, not the block we are trying to place.
  • If you want to figure out what is being placed, use getMaterial or getMaterialId instead.

Properties

Link copied to clipboard
public final static HandlerList handlers

Functions

Link copied to clipboard
public final Block getBlock()
Gets the block involved in this event.
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 Material that we are trying to place.
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 isBuildable()
Gets whether or not the block can be built here.
Link copied to clipboard
public void setBuildable(boolean cancel)
Sets whether the block can be built here or not.