Player
Information about the player binding
sendPacket
sendMessage
Parameter | Type | Description |
---|---|---|
msg | String | Message you want the player to send |
respawn
Sends a respawn packet
swingItem
Makes the player swing the current item.
setPitch
Sets the player's pitch
Parameter | Type | Description |
---|---|---|
pitch | Number | New player pitch |
setYaw
Sets the player's yaw
Parameter | Type | Description |
---|---|---|
yaw | Number | New player yaw |
setMotionX
Sets the player's motionX
Parameter | Type | Description |
---|---|---|
motionX | Number | New player motionX |
setMotionY
Sets the player's motionY
Parameter | Type | Description |
---|---|---|
motionY | Number | New player motionY |
setMotionZ
Sets the player's motionZ
Parameter | Type | Description |
---|---|---|
motionZ | Number | New player motionZ |
setPosition
Sets the players position
Parameter | Type | Description |
---|---|---|
x | Number | New player pos x |
y | Number | New player pos y |
z | Number | New player pos z |
jump
Makes the player jump
timerSpeed
Returns the player's current timer speed as a Number
speed
Returns the player's current speed as a Number
setSpeed
Sets the player's speed
Parameter | Type | Description |
---|---|---|
speed | Number | New player speed |
setSneaking
Sets to true to make the player sneak
Parameter | Type | Description |
---|---|---|
sneaking | Boolean | Set to true to make the player sneak |
setSprinting
Sets to true to make the player sprint
Parameter | Type | Description |
---|---|---|
sprinting | Boolean | Set to true to make the player sprint |
setFallDistance
Sets the player's fall distance
Parameter | Type | Description |
---|---|---|
fallDistance | Number | New player fall distance |
leftClick
Clicks the left mouse button
rightClick
Clicks the right mouse button
setHeldItemSlot
Set the current held item of the local player.
Parameter | Type | Description |
---|---|---|
slot | Number | New slot of the item in the hotbar (0-8) |
collidedHorizontally
Returns true if the player was collided horizontally
collidedVertically
Returns true if the player was collided horizontally
collided
Returns true if the player was collided at all
moving
Returns true if the player is moving
sneaking
Returns true if the player is sneaking
sprinting
Returns true if the player is sprinting
eating
Returns true if the player is eating
onGround
Returns true if the player is on ground
airBorne
Returns true if the player is air borne
onLadder
Returns true if the player is on a ladder
inWater
Returns true if the player is in water
inLava
Returns true if the player is in lava
inWeb
Returns true if the player is in a web
inPortal
Returns true if the player is in a portal
usingItem
Returns true if the player is using an item
burning
Returns true if the player is burning
dead
Returns true if the player is dead
isPotionActive
Parameter | Type | Description |
---|---|---|
potion | Checks to see if the specified potion is active |
name
Returns the player's name as a String
hurtTime
Returns the player's hurt time as a Number
heldItemSlot
Returns the player's currently held item's slot as a Number
ticksExisted
Returns the player's ticks existed as a Number
fallDistance
Returns the player's fall distance as a Number
health
Returns the player's health as a Number
maxHealth
Returns the player's max health as a Number
armor
Returns the player's total armor value as a Number
hunger
Returns the player's food level as a Number
absorption
Returns the player's absorption level as a Number
pitch
Returns the player's pitch as a Number
yaw
Returns the player's yaw as a Number
x
Returns the player's x pos as a Number
y
Returns the player's y pos as a Number
z
Returns the player's z pos as a Number
prevX
Returns the player's previous x pos as a Number
y
Returns the player's previous y pos as a Number
z
Returns the player's previous z pos as a Number
motionX
Returns the player's motion x as a Number
motionY
Returns the player's motion y as a Number
motionZ
Returns the player's motion z as a Number
getBaseMoveSpeed
Returns the base move speed of the player as a Number
getServerIP
Returns the current server ip as a String, returns "singleplayer" if the player is in singleplayer mode
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