public class PlayerWorldHitEvent extends PlayerWorldEditEvent
Modifier and Type | Class and Description |
---|---|
static class |
PlayerWorldHitEvent.Type |
Constructor and Description |
---|
PlayerWorldHitEvent(Player player,
float hitx,
float hity,
float hitz,
short dmg,
short id,
int cx,
int cy,
int cz,
int bx,
int by,
int bz,
PlayerWorldHitEvent.Type type) |
Modifier and Type | Method and Description |
---|---|
short |
getDamage()
Gets the amount of damage the player deals with this hit.
|
Vector3f |
getHitPosition()
Gets the coordinates where the world was hit exactly.
|
float |
getHitPositionX()
Gets the x coordinate where the world was hit exactly.
|
float |
getHitPositionY()
Gets the y coordinate where the world was hit exactly.
|
float |
getHitPositionZ()
Gets the z coordinate where the world was hit exactly.
|
PlayerWorldHitEvent.Type |
getType()
Gets the world hit type, i.e. if the player hit terrain, blocks etc.
|
getBlockPositionX, getBlockPositionY, getBlockPositionZ, getChunkPositionX, getChunkPositionY, getChunkPositionZ, getGlobalBlockPositionX, getGlobalBlockPositionY, getGlobalBlockPositionZ, isCancelled, setCancelled
getPlayer
public PlayerWorldHitEvent(Player player, float hitx, float hity, float hitz, short dmg, short id, int cx, int cy, int cz, int bx, int by, int bz, PlayerWorldHitEvent.Type type)
public short getDamage()
public Vector3f getHitPosition()
public float getHitPositionX()
public float getHitPositionY()
public float getHitPositionZ()
public PlayerWorldHitEvent.Type getType()