Player

Information about the player binding

sendPacket

player.sendPacket(packetID, args...)

See packet documentation

sendMessage

player.sendMessage(msg)
ParameterTypeDescription

msg

String

Message you want the player to send

respawn

player.respawn()

Sends a respawn packet

swingItem

player.swingItem()

Makes the player swing the current item.

setPitch

player.setPitch(pitch)

Sets the player's pitch

ParameterTypeDescription

pitch

Number

New player pitch

setYaw

player.setYaw(yaw)

Sets the player's yaw

ParameterTypeDescription

yaw

Number

New player yaw

setMotionX

player.setMotionX(motionX)

Sets the player's motionX

ParameterTypeDescription

motionX

Number

New player motionX

setMotionY

player.setMotionY(motionY)

Sets the player's motionY

ParameterTypeDescription

motionY

Number

New player motionY

setMotionZ

player.setMotionZ(motionZ)

Sets the player's motionZ

ParameterTypeDescription

motionZ

Number

New player motionZ

setPosition

player.setPosition(x, y, z)

Sets the players position

ParameterTypeDescription

x

Number

New player pos x

y

Number

New player pos y

z

Number

New player pos z

jump

player.jump()

Makes the player jump

timerSpeed

var currentTimerSpeed = player.timerSpeed()

Returns the player's current timer speed as a Number

speed

var currentSpeed = player.speed()

Returns the player's current speed as a Number

setSpeed

player.setSpeed(speed)

Sets the player's speed

ParameterTypeDescription

speed

Number

New player speed

setSneaking

player.setSneaking(sneaking)

Sets to true to make the player sneak

ParameterTypeDescription

sneaking

Boolean

Set to true to make the player sneak

setSprinting

player.setSprinting(sprinting)

Sets to true to make the player sprint

ParameterTypeDescription

sprinting

Boolean

Set to true to make the player sprint

setFallDistance

player.setFallDistance(fallDistance)

Sets the player's fall distance

ParameterTypeDescription

fallDistance

Number

New player fall distance

leftClick

player.leftClick()

Clicks the left mouse button

rightClick

player.rightClick()

Clicks the right mouse button

setHeldItemSlot

player.setHeldItemSlot(slot)

Set the current held item of the local player.

ParameterTypeDescription

slot

Number

New slot of the item in the hotbar (0-8)

collidedHorizontally

player.collidedHorizontally()

Returns true if the player was collided horizontally

collidedVertically

player.collidedVertically()

Returns true if the player was collided horizontally

collided

player.collided()

Returns true if the player was collided at all

moving

player.moving()

Returns true if the player is moving

sneaking

player.sneaking()

Returns true if the player is sneaking

sprinting

player.sprinting()

Returns true if the player is sprinting

eating

player.eating()

Returns true if the player is eating

onGround

player.onGround()

Returns true if the player is on ground

airBorne

player.airBorne()

Returns true if the player is air borne

onLadder

player.onLadder()

Returns true if the player is on a ladder

inWater

player.inWater()

Returns true if the player is in water

inLava

player.inLava()

Returns true if the player is in lava

inWeb

player.inWeb()

Returns true if the player is in a web

inPortal

player.inPortal()

Returns true if the player is in a portal

usingItem

player.usingItem()

Returns true if the player is using an item

burning

player.burning()

Returns true if the player is burning

dead

player.dead()

Returns true if the player is dead

isPotionActive

player.isPotionActive(potion)
ParameterTypeDescription

potion

Checks to see if the specified potion is active

name

player.name()

Returns the player's name as a String

hurtTime

player.hurtTime()

Returns the player's hurt time as a Number

heldItemSlot

player.heldItemSlot()

Returns the player's currently held item's slot as a Number

ticksExisted

player.ticksExisted()

Returns the player's ticks existed as a Number

fallDistance

player.fallDistance()

Returns the player's fall distance as a Number

health

player.health()

Returns the player's health as a Number

maxHealth

player.maxHealth()

Returns the player's max health as a Number

armor

player.armorValue()

Returns the player's total armor value as a Number

hunger

player.hunger()

Returns the player's food level as a Number

absorption

player.absorption()

Returns the player's absorption level as a Number

pitch

player.pitch()

Returns the player's pitch as a Number

yaw

player.yaw()

Returns the player's yaw as a Number

x

player.x()

Returns the player's x pos as a Number

y

player.y()

Returns the player's y pos as a Number

z

player.z()

Returns the player's z pos as a Number

prevX

player.prevX()

Returns the player's previous x pos as a Number

y

player.prevY()

Returns the player's previous y pos as a Number

z

player.prevZ()

Returns the player's previous z pos as a Number

motionX

player.motionX()

Returns the player's motion x as a Number

motionY

player.motionY()

Returns the player's motion y as a Number

motionZ

player.motionZ()

Returns the player's motion z as a Number

getBaseMoveSpeed

player.getBaseMoveSpeed()

Returns the base move speed of the player as a Number

getServerIP

var serverIP = player.getServerIP()

Returns the current server ip as a String, returns "singleplayer" if the player is in singleplayer mode

getInventorySlot

var stack = player.getInventorySlot();

Returns an ItemStack object of the specified slot in the player's inventory. Returns null if there is no stack in that slot

Last updated