EntityPlayerSP
A player entity
Extends
Properties
chasingPosX
chasingPosX:
number
The position that the server last reported for this player. Updated every 3 ticks, with the player smoothly moving towards this position over those ticks.
Inherited from
chasingPosY
chasingPosY:
number
The position that the server last reported for this player. Updated every 3 ticks, with the player smoothly moving towards this position over those ticks.
Inherited from
chasingPosZ
chasingPosZ:
number
The position that the server last reported for this player. Updated every 3 ticks, with the player smoothly moving towards this position over those ticks.
Inherited from
dimension
dimension:
number
The dimension the entity is in: 0 for the Overworld, -1 for the Nether, and 1 for The End
Inherited from
entityID
readonlyentityID:number
Inherited from
height
height:
number
The height of the entity.
Inherited from
hurtTime
hurtTime:
number
The hurt time in ticks.
Inherited from
inventory
readonlyinventory:InventoryPlayer
The player inventory.
Inherited from
isDead
isDead:
boolean
Inherited from
lastReportedPitch
lastReportedPitch:
number
The last reported pitch of the player.
lastReportedPosX
lastReportedPosX:
number
The last reported X position of the player.
lastReportedPosY
lastReportedPosY:
number
The last reported Y position of the player.
lastReportedPosZ
lastReportedPosZ:
number
The last reported Z position of the player.
lastReportedYaw
lastReportedYaw:
number
The last reported yaw of the player.
motionX
motionX:
number
The X motion (velocity) of the entity.
Inherited from
motionY
motionY:
number
The Y motion (velocity) of the entity.
Inherited from
motionZ
motionZ:
number
The Z motion (velocity) of the entity.
Inherited from
onGround
readonlyonGround:boolean
Inherited from
posX
posX:
number
The X position of the entity.
Inherited from
posY
posY:
number
The Y position of the entity.
Inherited from
posZ
posZ:
number
The Z position of the entity.
Inherited from
prevChasingPosX
prevChasingPosX:
number
The previous position that the server last reported for this player.
Inherited from
prevChasingPosY
prevChasingPosY:
number
The previous position that the server last reported for this player.
Inherited from
prevChasingPosZ
prevChasingPosZ:
number
The previous position that the server last reported for this player.
Inherited from
prevPosX
prevPosX:
number
The previous X position of the entity.
Inherited from
prevPosY
prevPosY:
number
The previous Y position of the entity.
Inherited from
prevPosZ
prevPosZ:
number
The previous Z position of the entity.
Inherited from
prevRotationPitch
prevRotationPitch:
number
The previous pitch rotation of the entity.
Inherited from
EntityPlayer.prevRotationPitch
prevRotationYaw
prevRotationYaw:
number
The previous yaw rotation of the entity.
Inherited from
rotationPitch
rotationPitch:
number
The pitch rotation of the entity.
Inherited from
rotationYaw
rotationYaw:
number
The yaw rotation of the entity.
Inherited from
serverSneakState
serverSneakState:
boolean
The server-side sneak state of the player.
serverSprintState
serverSprintState:
boolean
The server-side sprint state of the player.
ticksAlive
readonlyticksAlive:number
The amount of ticks the entity has existed.
Inherited from
width
width:
number
The width of the entity.
Inherited from
Methods
getCollisionBox()
getCollisionBox():
AxisAlignedBB
Gets the collision box of the entity.
Returns
Inherited from
getEntityBoundingBox()
getEntityBoundingBox():
AxisAlignedBB
Returns
The bounding box of the entity.
Inherited from
EntityPlayer.getEntityBoundingBox
getHealth()
getHealth():
number
Returns
number
The current health of the entity.
Inherited from
getHeldItem()
getHeldItem():
ItemStack
Returns
The item the entity is currently holding.
Inherited from
getLookVec()
getLookVec():
Vec3
Returns
A vector in the direction the entity is looking at. Very useful for raytracing.
Inherited from
getMaxHealth()
getMaxHealth():
number
Returns
number
The maximum health of the entity.
Inherited from
getName()
getName():
string
Returns
string
The name of the player.
Inherited from
getPosition()
getPosition():
Vec3
Gets the position of the entity as vec3
Returns
Inherited from
getPositionEyes()
getPositionEyes():
Vec3
Gets the position of the eyes as vec3.
Returns
Inherited from
getUUID()
getUUID():
string
Returns
string
The players UUID as string
Inherited from
heal()
heal(
amount):void
Heals the entity by the specified amount of health.
Parameters
amount
number
The amount of health to heal.
Returns
void
Inherited from
isBurning()
isBurning():
boolean
Returns
boolean
If the entity is burning.
Inherited from
isEating()
isEating():
boolean
Returns
boolean
If the entity is eating.
Inherited from
isInWater()
isInWater():
boolean
Returns
boolean
If the entity is in water.
Inherited from
isRiding()
isRiding():
boolean
Returns
boolean
If the entity is riding something.
Inherited from
isSneaking()
isSneaking():
boolean
Returns
boolean
If the entity is sneaking.
Inherited from
isSprinting()
isSprinting():
boolean
Returns
boolean
If the entity is sprinting.
Inherited from
isWet()
isWet():
boolean
Returns
boolean
If the entity is wet. LOL
Inherited from
setEntityBoundingBox()
setEntityBoundingBox(
aabb):void
Sets the bounding box of the entity.
Parameters
aabb
Returns
void
Inherited from
EntityPlayer.setEntityBoundingBox
setHealth()
setHealth(
amount):void
Sets the health of the entity to the specified amount of health.
Parameters
amount
number
The amount of health to set the entity to.
Returns
void
Inherited from
setOnGround()
setOnGround(
onGround):void
Sets the entities onGround state.
Parameters
onGround
boolean
Returns
void
Inherited from
setPosition()
setPosition(
x,y,z):void
Sets the position and updates its bounding box.
Parameters
x
number
y
number
z
number
Returns
void
Inherited from
setSneaking()
setSneaking(
sneaking):void
Sets the entities sneaking state.
Parameters
sneaking
boolean
Returns
void
Inherited from
setSprinting()
setSprinting(
sprinting):void
Sets the entities sprinting state.
Parameters
sprinting
boolean
Returns
void
Inherited from
swingItem()
swingItem():
void
Makes the player swing their arm clientside and also sends a C0APacketAnimation to the server.
Returns
void
Last updated