public class PlayerPlaceVegetationEvent extends PlayerVegetationEvent implements Cancellable
| Constructor and Description |
|---|
PlayerPlaceVegetationEvent(Player player,
short plantid,
int cx,
int cy,
int cz,
short px,
short py,
short pz,
short rx,
short ry,
short rz,
int growthTime) |
| Modifier and Type | Method and Description |
|---|---|
int |
getGrowthTime()
Gets the growth time for this plant in seconds.
|
boolean |
isCancelled()
Determines if the event is cancelled.
|
boolean |
isGrowable()
Gets whether or not this plant can grow.
|
void |
setCancelled(boolean cancel)
Cancels this event.
|
void |
setGrowthTime(int growthTime)
Sets the growth time (seconds) for this plant, i.e. how long it takes until
this plant grows and reaches the next growth stage.
|
void |
setPlantPosition(float x,
float y,
float z)
Changes the plant position.
|
void |
setPlantPosition(Vector3f position)
Changes the plant position.
|
void |
setPlantRotation(float pitch,
float yaw,
float roll)
Changes the plant rotation.
|
void |
setPlantRotation(Quaternion rotation)
Changes the plant rotation.
|
void |
setPlantTypeID(short id)
Sets the type ID of the plant.
|
getChunkPositionX, getChunkPositionY, getChunkPositionZ, getPlantDefinition, getPlantPosition, getPlantPositionX, getPlantPositionY, getPlantPositionZ, getPlantRotation, getPlantRotationX, getPlantRotationY, getPlantRotationZ, getPlantTypeID, getPX, getPY, getPZ, getRX, getRY, getRZgetPlayerpublic PlayerPlaceVegetationEvent(Player player, short plantid, int cx, int cy, int cz, short px, short py, short pz, short rx, short ry, short rz, int growthTime)
public void setPlantTypeID(short id)
id - the new plant type ID.public void setPlantPosition(Vector3f position)
position - the new plant world position.public void setPlantPosition(float x,
float y,
float z)
x - the new plant world x position.y - the new plant world y position.z - the new plant world z position.public void setPlantRotation(Quaternion rotation)
rotation - the new plant rotation. Set to null to reset the rotation
(Quaternion.IDENTITY).public void setPlantRotation(float pitch,
float yaw,
float roll)
pitch - the new x angle, as euler rotation (pitch).yaw - the new y angle, as euler rotation (yaw).roll - the new z angle, as euler rotation (roll).public boolean isGrowable()
public int getGrowthTime()
public void setGrowthTime(int growthTime)
getGrowthTime().growthTime - the growth time, in seconds.isGrowable(),
PlantGrowEventpublic boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
CancellablesetCancelled in interface Cancellablecancel - set to true if you want to cancel this event.