public class BlockCanBuildEvent extends BlockEvent
Note:
getMaterial()
or getMaterialId()
instead.
Event.Result
Modifier and Type | Field and Description |
---|---|
protected boolean |
buildable |
protected int |
material
Deprecated.
Magic value
|
block
Constructor and Description |
---|
BlockCanBuildEvent(Block block,
int id,
boolean canBuild)
Deprecated.
Magic value
|
Modifier and Type | Method and Description |
---|---|
static HandlerList |
getHandlerList() |
HandlerList |
getHandlers() |
Material |
getMaterial()
Gets the Material that we are trying to place.
|
int |
getMaterialId()
Deprecated.
Magic value
|
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.
|
getBlock
getEventName, isAsynchronous
protected boolean buildable
@Deprecated protected int material
@Deprecated public BlockCanBuildEvent(Block block, int id, boolean canBuild)
block
- the block involved in this eventid
- the id of the block to placecanBuild
- whether we can buildpublic 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()
@Deprecated public int getMaterialId()
public HandlerList getHandlers()
getHandlers
in class Event
public static HandlerList getHandlerList()
Copyright © 2022. All rights reserved.