public class BlockCanBuildEvent extends BlockEvent
Note:
getMaterial() instead.
 Event.Result| Modifier and Type | Field | Description | 
|---|---|---|
| protected BlockData | blockData | |
| protected boolean | buildable | 
block| Constructor | Description | 
|---|---|
| BlockCanBuildEvent(Block block,
                  BlockData type,
                  boolean canBuild) | Deprecated.  | 
| BlockCanBuildEvent(Block block,
                  Player player,
                  BlockData type,
                  boolean canBuild) | 
| Modifier and Type | Method | Description | 
|---|---|---|
| BlockData | getBlockData() | Gets the BlockData that we are trying to place. | 
| static HandlerList | getHandlerList() | |
| HandlerList | getHandlers() | |
| Material | getMaterial() | Gets the Material that we are trying to place. | 
| Player | getPlayer() | Gets the player who placed the block involved in this event. | 
| boolean | isBuildable() | Gets whether or not the block can be built here. | 
| void | setBuildable(boolean cancel) | Sets whether the block can be built here or not. | 
getBlockgetEventName, isAsynchronousprotected boolean buildable
protected BlockData blockData
@Deprecated public BlockCanBuildEvent(@NotNull Block block, @NotNull BlockData type, boolean canBuild)
public boolean isBuildable()
By default, returns Minecraft's answer on whether the block can be built here or not.
public void setBuildable(boolean cancel)
cancel - true if you want to allow the block to be built here
     despite Minecraft's default behaviour@NotNull public Material getMaterial()
@NotNull public BlockData getBlockData()
@Nullable public Player getPlayer()
@NotNull public HandlerList getHandlers()
getHandlers in class Event@NotNull public static HandlerList getHandlerList()
Copyright © 2019. All rights reserved.