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) |
| 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.
|
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
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 behaviourpublic Material getMaterial()
public BlockData getBlockData()
public HandlerList getHandlers()
getHandlers in class Eventpublic static HandlerList getHandlerList()
Copyright © 2018. All rights reserved.