public class PlayerPlaceBlockEvent extends PlayerWorldEditEvent
| Constructor and Description |
|---|
PlayerPlaceBlockEvent(Player player,
int blockID,
int cx,
int cy,
int cz,
int bx,
int by,
int bz,
byte blockCount,
byte blockDir) |
| Modifier and Type | Method and Description |
|---|---|
int |
getBlockID()
Gets the id of the block the player wants to place.
|
byte |
getMultiplePlacementCount()
Gets the amount of blocks that will be placed.
|
byte |
getMultiplePlacementDirection()
Gets the block row direction if the player places multiple blocks in a row
at once.
|
boolean |
isMultiplePlacement()
Gets whether or not the player places multiple blocks in a row at once.
|
void |
setBlockID(int id)
Changes the block id to another id.
|
void |
setMultiplePlacementCount(byte count)
Sets the amount of blocks that will be placed.
|
void |
setMultiplePlacementDirection(byte direction)
Sets the direction of the block row for multiple block placement (i.e. placing
multiple blocks at once).
|
getBlockPositionX, getBlockPositionY, getBlockPositionZ, getChunkPositionX, getChunkPositionY, getChunkPositionZ, getGlobalBlockPositionX, getGlobalBlockPositionY, getGlobalBlockPositionZ, isCancelled, setCancelledgetPlayerpublic PlayerPlaceBlockEvent(Player player, int blockID, int cx, int cy, int cz, int bx, int by, int bz, byte blockCount, byte blockDir)
public int getBlockID()
public void setBlockID(int id)
id - the new block id.public byte getMultiplePlacementCount()
isMultiplePlacement() is true (i.e. when the player places multiple
blocks in a row at once).public byte getMultiplePlacementDirection()
public void setMultiplePlacementCount(byte count)
setMultiplePlacementDirection(byte).count - the amount of blocks that will be placed.public void setMultiplePlacementDirection(byte direction)
setMultiplePlacementCount(byte)) is greater than 1direction - the block row direction (set to 0 to disable multiple block
placement, i.e. to just place a single block).public boolean isMultiplePlacement()