EntityPlayerSP
The player entity
Getting the player  entity.
You can get the player entity from the mc namespace. 
'tick': function() {
    player = mc.getPlayer()
    
    player.jump()
    
    player.swingItem()
}setX(double x): void
setX(double x): voidSets the x position of the player.
setY(double x): void
setY(double x): voidSets the y position of the player.
setZ(double x): void
setZ(double x): voidSets the z position of the player.
Set the x, y, and z position of the player using a Vec3.
setPitch(float pitch): void
setPitch(float pitch): voidSet the pitch of the player.
setYaw(float yaw): void
setYaw(float yaw): voidSet the yaw of the player.
setLastPitch(float pitch): void
setLastPitch(float pitch): voidSet the prevPitch of the player.
setLastYaw(float yaw): void
setLastYaw(float yaw): voidSet the prevYaw of the player.
setMotionX(double motionX): void
setMotionX(double motionX): voidSets the motionX of the player.
setMotionY(double motionY): void
setMotionY(double motionY): voidSets the motionY of the player.
setMotionZ(double motionZ): void
setMotionZ(double motionZ): voidSets the motionZ of the player.
Set the motionX, motionY, and motionZ of the player using a Vec3.
getForward(): float
getForward(): floatReturns the moveForward input of the player.
getStrafe(): float
getStrafe(): floatReturns the moveStrafe input of the player.
isUsingItem(): boolean
isUsingItem(): booleanReturns True if the player is using an item.
swingItem(): void
swingItem(): voidSwings the hand and sends a C0APacketAnimation.
sendChatMessage(String message): void
sendChatMessage(String message): voidSend a chat message to the server, can be used for commands.
jump(): void
jump(): voidMakes the player jump up.
isSneaking(): boolean
isSneaking(): booleanReturns true if the player is sneaking.
setSneaking(boolean sneak): void
setSneaking(boolean sneak): voidSet the sneaking state of the player.
isSprinting(): boolean
isSprinting(): booleanReturns true if the player is currently sprinting.
setSprinting(boolean sprint): void
setSprinting(boolean sprint): voidMake the player start or stop sprinting.
Last updated