Player

player.jump

Makes the player jump

player.jump()

player.setPosition

Parameters

Type

Description

x

double

x coordinate

y

double

y coordinate

z

double

z coordinate

player.setPosition(x,y,z)

player.getBaseMoveSpeed

Returns the player base move speed

player.getBaseMoveSpeed() - double

player.setSpeed

Sets the player speed

Parameters

Type

speed

double

player.getSpeed

Returns the player motion speed

player.isOnGround

Returns the ground state of a player

player.setOnGround

Sets player ground state

Parameters

Type

state

boolean

player.getName

Returns the player name

player.getLastTickDistance

Returns the distance travelled during the last tick

player.getHeldItemName

Returns unlocalized name of the held item

player.getHeldItemDisplayName

Returns the display name of the held item

player.getTagCompound

Returns the tag compound string of the held item

player.setMotionX

Sets the player motion X. Returns the motion you set

Parameters

Type

motionX

double

player.setMotionY

Sets the player motion Y. Returns the motion you set

Parameters

Type

motionY

double

player.setMotionZ

Sets the player motion Z. Returns the motion you set

Parameters

Type

motionZ

double

player.getX

Returns the X position of a player

player.getY

Returns the Y position of a player

player.getZ

Returns the Z position of a player

player.setX

Sets the X position for the player. Returns the position you set

Parameters

Type

x

double

player.setY

Sets the Y position for the player. Returns the position you set

Parameters

Type

y

double

player.setZ

Sets the Z position for the player. Returns the position you set

Parameters

Type

z

double

player.attackEntity

Attacks the entity you provide

Parameters

Type

entity

Entity

player.getDistanceToEntity

Returns a distance from the player to an entity in blocks

Parameters

Type

entity

Entity

player.getDistanceToEntity2D

Returns a distance from the player to an entity in blocks (XZ axis only)

Parameters

Type

entity

Entity

player.swingItem

Makes the player swing the item

player.getFallDistance

Returns player's fall distance in blocks

player.getHeldItem

Returns the held item of a player

player.isMoving

Returns true if the player is moving

player.getHealth

Returns the health of the player (number of hearts multiplied by 2)

player.sendMessage

Sends the message you provide in the chat

Parameters

Type

message

String

player.getDisplayName

Returns the display name of a player

player.setSlot

Sets the current slot to the slot you provide

Parameters

Type

slotId

Integer

player.getHurtTime

Returns the hurt timer of the player

player.getHurtResistantTimer

Returns the hurt resistant time of a player

player.getFoodLevel

Returns the food level of a player

player.isBurning

Returns true if the player is burning

player.leftClick

Left clicks

player.rightClick

Right Clicks

player.isInWater

Returns true if the player is in water

player.isInLava

Returns true if the player is in lava

player.isSneaking

Returns true if the player is sneaking

player.setSneaking

Sets the player's sneaking state

Parameters

Type

state

Boolean

player.isRiding

Returns true if the player is riding an entity

player.isCollidedVertically

Returns true if the player is collided vertically

player.isCollidedHorizontally

Returns true if the player is collided vertically

player.ticksExisted

Returns the amount of ticks player exists in the world

player.setYaw

Sets the player rotation yaw

Parameters

Type

angle

float

player.setPitch

Sets the player rotation pitch

Parameters

Type

angle

float

player.getUUID

Returns the unique ID of the player

player.getPrevPosX

Returns the previous position X of the player

player.getPrevPosY

Returns the previous position Y of the player

player.getPrevPosZ

Returns the previous position Z of the player

Last updated

Was this helpful?