player

The global instance of the EntityAPI and its subtypes
field signature:
player
Method Property Fluent Description Representation
Field Type a PlayerAPI

PlayerAPI.getExperienceProgress

Gets the progress of the way towards the player's next level, as a value from 0 to 1
overload 1:
player:getExperienceProgress()
Method Property Fluent Description Representation
Return Value a Number

PlayerAPI.getChargedAttackDelay

Returns the delay (in ticks) of charged attacks
overload 1:
player:getChargedAttackDelay()
Method Property Fluent Description Representation
Return Value a Number

PlayerAPI.getShoulderEntity

Returns a table of the nbt of this entity left or right shoulder entity
overload 1:
player:getShoulderEntity()
Method Property Fluent Description Representation
Return Value a table
overload 2:
player:getShoulderEntity(right)
Method Property Fluent Description Representation
right accepts a Boolean
Return Value a table

PlayerAPI.isSkinLayerVisible

Example by JimmyHelp:
Returns whether the specified skin layer, from the Skin Customizations settings, is currently visible
overload 1:
player:isSkinLayerVisible(part)
Method Property Fluent Description Representation
part accepts a String
Return Value a Boolean

PlayerAPI.getGamemode

Example by JimmyHelp:
Returns "SURVIVAL", "CREATIVE", "ADVENTURE", or "SPECTATOR" depending on the player's gamemode
If the gamemode is unknown,
returns nil
overload 1:
player:getGamemode()
Method Property Fluent Description Representation
Return Value either a String or nil

PlayerAPI.isFishing

Returns if the player is currently fishing
overload 1:
player:isFishing()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.hasSkin

Returns whether the player has a custom skin loaded
overload 1:
player:hasSkin()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.getModelType

Example by JimmyHelp:
Returns "SLIM" or "DEFAULT", depending on the player's model type
overload 1:
player:getModelType()
Method Property Fluent Description Representation
Return Value a String

PlayerAPI.getExhaustion

Gets the current exhaustion level of the player
overload 1:
player:getExhaustion()
Method Property Fluent Description Representation
Return Value a Number

PlayerAPI.hasCape

Returns whether the player has a cape loaded
overload 1:
player:hasCape()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.getIPAddress

Returns this player's IP address
overload 1:
player:getIPAddress()
Method Property Fluent Description Representation
Return Value a String

PlayerAPI.getTeamInfo

Returns a table with information about the team of this player
Returns nil if the player doesn't have a team
overload 1:
player:getTeamInfo()
Method Property Fluent Description Representation
Return Value a table

PlayerAPI.getSaturation

Example by JimmyHelp:
Gets the current saturation level of the player
overload 1:
player:getSaturation()
Method Property Fluent Description Representation
Return Value a Number

PlayerAPI.getExperienceLevel

Example by JimmyHelp:
Gets the player's current level
overload 1:
player:getExperienceLevel()
Method Property Fluent Description Representation
Return Value an Integer

PlayerAPI.getFood

Example by JimmyHelp:
Gets the current food level of the player, from 0 to 20
overload 1:
player:getFood()
Method Property Fluent Description Representation
Return Value an Integer

PlayerAPI.isBlocking

Inherited from LivingEntityAPI

Return if this entity is blocking with a shield
overload 1:
player:isBlocking()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.isVisuallySwimming

Inherited from LivingEntityAPI

Returns if this entity has the swimming pose
overload 1:
player:isVisuallySwimming()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.isLeftHanded

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns true if the entity's main hand is its left
overload 1:
player:isLeftHanded()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.getBodyYaw

Inherited from LivingEntityAPI

Example by JimmyHelp:
Gets the yaw of this entity's body in degrees
If delta is passed in,
then it will be used to linearly interpolate the rotation of the body between the previous tick and the current tick
The default value of delta is 1
overload 1:
player:getBodyYaw()
Method Property Fluent Description Representation
Return Value a Number
overload 2:
player:getBodyYaw(delta)
Method Property Fluent Description Representation
delta accepts a Number
Return Value a Number

PlayerAPI.isGliding

Inherited from LivingEntityAPI

Returns if this entity is gliding with an elytra
overload 1:
player:isGliding()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.riptideSpinning

Inherited from LivingEntityAPI

Returns if this entity is riptide spinning
overload 1:
player:riptideSpinning()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.getActiveItem

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns an ItemStack representing the item the entity is currently using
If they're not using any item,
returns air
overload 1:
player:getActiveItem()
Method Property Fluent Description Representation
Return Value an ItemStack

PlayerAPI.getSwingArm

Inherited from LivingEntityAPI

Returns "OFF_HAND" or "MAIN_HAND", based on the arm this entity is currently swinging
overload 1:
player:getSwingArm()
Method Property Fluent Description Representation
Return Value a String

PlayerAPI.getActiveHand

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns "OFF_HAND" or "MAIN_HAND", depending on which hand this entity uses an item with
overload 1:
player:getActiveHand()
Method Property Fluent Description Representation
Return Value a String

PlayerAPI.getActiveItemTime

Inherited from LivingEntityAPI

Returns the ticks this entity's active item has been used for
overload 1:
player:getActiveItemTime()
Method Property Fluent Description Representation
Return Value an Integer

PlayerAPI.getHeldItem

Inherited from LivingEntityAPI

Returns an ItemStack representing the item in this entity's main hand
If true is passed in for "offhand",
then it will instead look at the item in the entity's offhand
If the entity isn't holding an item in that hand,
returns air
overload 1:
player:getHeldItem()
Method Property Fluent Description Representation
Return Value an ItemStack
overload 2:
player:getHeldItem(offhand)
Method Property Fluent Description Representation
offhand accepts a Boolean
Return Value an ItemStack

PlayerAPI.getDeathTime

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns the number of ticks this entity has been dead for
overload 1:
player:getDeathTime()
Method Property Fluent Description Representation
Return Value a Number

PlayerAPI.getEntityCategory

Inherited from LivingEntityAPI

Returns the category of this entity
The categories are: "ARTHROPOD",
"UNDEAD", "WATER", "ILLAGER" and by default, "UNDEFINED"
overload 1:
player:getEntityCategory()
Method Property Fluent Description Representation
Return Value a String

PlayerAPI.getSwingTime

Inherited from LivingEntityAPI

Returns the number of ticks this entity has the arm swinging
overload 1:
player:getSwingTime()
Method Property Fluent Description Representation
Return Value an Integer

PlayerAPI.isSwingingArm

Inherited from LivingEntityAPI

Returns true if the entity is currently swinging its arm
overload 1:
player:isSwingingArm()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.isClimbing

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns true if the entity is currently using a climbable block, like a ladder or vine
overload 1:
player:isClimbing()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.getAbsorptionAmount

Inherited from LivingEntityAPI

Returns the amount of this entity's absorption (yellow hearts)
overload 1:
player:getAbsorptionAmount()
Method Property Fluent Description Representation
Return Value a Number

PlayerAPI.isUsingItem

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns true if the entity is currently using an item
overload 1:
player:isUsingItem()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.getArrowCount

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns the number of arrows sticking out of this entity
overload 1:
player:getArrowCount()
Method Property Fluent Description Representation
Return Value an Integer

PlayerAPI.getStingerCount

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns the number of bee stingers sticking out of this entity
overload 1:
player:getStingerCount()
Method Property Fluent Description Representation
Return Value an Integer

PlayerAPI.isSensitiveToWater

Inherited from LivingEntityAPI

Returns if this entity takes damage to water
overload 1:
player:isSensitiveToWater()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.getSwingDuration

Inherited from LivingEntityAPI

Returns the number of ticks this entity will have while swinging its arms
overload 1:
player:getSwingDuration()
Method Property Fluent Description Representation
Return Value an Integer

PlayerAPI.getMaxHealth

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns the maximum amount of health this entity can have
overload 1:
player:getMaxHealth()
Method Property Fluent Description Representation
Return Value a Number

PlayerAPI.getHealth

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns the amount of health this entity has remaining
overload 1:
player:getHealth()
Method Property Fluent Description Representation
Return Value a Number

PlayerAPI.getArmor

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns the amount of armor points this entity has
overload 1:
player:getArmor()
Method Property Fluent Description Representation
Return Value a Number

PlayerAPI.getName

Inherited from LivingEntityAPI

Example by JimmyHelp:
Gets the name of this entity, if it has a custom name
If it doesn't,
returns a translated form of getType()
overload 1:
player:getName()
Method Property Fluent Description Representation
Return Value a String

PlayerAPI.isAlive

Inherited from LivingEntityAPI

Returns whether this entity is alive or not
overload 1:
player:isAlive()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.getType

Inherited from LivingEntityAPI

Example by JimmyHelp:
Gets the Minecraft identifier of this entity
For instance,
"minecraft:pig"
overload 1:
player:getType()
Method Property Fluent Description Representation
Return Value a String

PlayerAPI.isLoaded

Inherited from LivingEntityAPI

Example by JimmyHelp:
Checks if this entity object is still being updated and loaded
A non-loaded entity would be someone or something which is in another dimension or out of the render distance for example
overload 1:
player:isLoaded()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.getItem

Inherited from LivingEntityAPI

Example by JimmyHelp:
Gets an ItemStack for the item in the given slot
For the player,
slots are indexed with 1 as the main hand, 2 as the off hand, and 3,4,5,6 as the 4 armor slots from the boots to the helmet
If an invalid slot number is given,
this will return nil
overload 1:
player:getItem(index)
Method Property Fluent Description Representation
index accepts an Integer
Return Value an ItemStack

PlayerAPI.isSneaking

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns true if this entity is logically sneaking (can't fall from blocks edges, can't see nameplate behind walls, etc)
overload 1:
player:isSneaking()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.isWet

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns true in any of three conditions: if the entity is in water, if the entity is in rain, or if the entity is in a bubble column
Otherwise,
returns false
overload 1:
player:isWet()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.isCute

Inherited from LivingEntityAPI

figura.docs.entity.is_cute
overload 1:
player:isCute()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.getVelocity

Inherited from LivingEntityAPI

Example by JimmyHelp:
Gets the current velocity of this entity in world coordinates, calculated as its position this tick minus its position last tick
overload 1:
player:getVelocity()
Method Property Fluent Description Representation
Return Value a Vector3

PlayerAPI.isHamburger

Inherited from LivingEntityAPI

Example by JimmyHelp:
figura.docs.entity.is_hamburger
overload 1:
player:isHamburger()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.hasAvatar

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns true if Figura has an avatar loaded for this entity
overload 1:
player:hasAvatar()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.getMaxAir

Inherited from LivingEntityAPI

Example by JimmyHelp:
Gets the maximum amount of air this entity can have
overload 1:
player:getMaxAir()
Method Property Fluent Description Representation
Return Value an Integer

PlayerAPI.getDimensionName

Inherited from LivingEntityAPI

Gets the Minecraft identifier of the dimension this entity is in
overload 1:
player:getDimensionName()
Method Property Fluent Description Representation
Return Value a String

PlayerAPI.getLookDir

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns a unit vector pointing in the direction that this entity is looking
See the blue line in the F3+B screen for an example
overload 1:
player:getLookDir()
Method Property Fluent Description Representation
Return Value a Vector3

PlayerAPI.getFrozenTicks

Inherited from LivingEntityAPI

Example by JimmyHelp:
Gets the number of ticks this entity has been freezing in powder snow for
overload 1:
player:getFrozenTicks()
Method Property Fluent Description Representation
Return Value an Integer

PlayerAPI.getPos

Inherited from LivingEntityAPI

Example by JimmyHelp:
Gets the position of the entity in the world
If delta is passed in,
then it will be used to linearly interpolate the position of the entity between the previous tick and the current tick
The default value of delta is 1
overload 1:
player:getPos()
Method Property Fluent Description Representation
Return Value a Vector3
overload 2:
player:getPos(delta)
Method Property Fluent Description Representation
delta accepts a Number
Return Value a Vector3

PlayerAPI.getRot

Inherited from LivingEntityAPI

Example by JimmyHelp:
Gets the rotation of the entity in degrees
If delta is passed in,
then it will be used to linearly interpolate the rotation of the entity between the previous tick and the current tick
The default value of delta is 1
overload 1:
player:getRot()
Method Property Fluent Description Representation
Return Value a Vector2
overload 2:
player:getRot(delta)
Method Property Fluent Description Representation
delta accepts a Number
Return Value a Vector2

PlayerAPI.getNbt

Inherited from LivingEntityAPI

Gets a table containing the NBT of this entity
Please note that not all values in the entity's NBT may be synced,
as some are handled only on the server side
overload 1:
player:getNbt()
Method Property Fluent Description Representation
Return Value a table

PlayerAPI.getEyeHeight

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns the current eye height of this entity
overload 1:
player:getEyeHeight()
Method Property Fluent Description Representation
Return Value a Number

PlayerAPI.getPose

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns the current pose of the player
This can be one of: "STANDING",
"FALL_FLYING", "SLEEPING", "SWIMMING", "SPIN_ATTACK", "CROUCHING", "LONG_JUMPING", or "DYING"
overload 1:
player:getPose()
Method Property Fluent Description Representation
Return Value a String

PlayerAPI.isInLava

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns true if this entity is currently in lava
overload 1:
player:isInLava()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.isOnFire

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns true if this entity is currently on fire
overload 1:
player:isOnFire()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.isCrouching

Inherited from LivingEntityAPI

Returns true if this entity is visually sneaking
overload 1:
player:isCrouching()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.isInWater

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns true if this entity is currently in a water block, including waterlogging
overload 1:
player:isInWater()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.isSilent

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns true if this entity is silent
overload 1:
player:isSilent()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.isInRain

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns true if this entity is currently standing in rain
overload 1:
player:isInRain()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.isSprinting

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns true if this entity is currently sprinting
overload 1:
player:isSprinting()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.getEyeY

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns the Y level of this entity's eyes
Not to be confused with getEyeHeight,
this function also takes the entity itself's Y position into account
overload 1:
player:getEyeY()
Method Property Fluent Description Representation
Return Value a Number

PlayerAPI.isInvisible

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns true if this entity is invisible, for one reason or another
overload 1:
player:isInvisible()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.getPermissionLevel

Inherited from LivingEntityAPI

Returns the permission level number of this entity
Server Operators,
by default, have the permission level of 4
overload 1:
player:getPermissionLevel()
Method Property Fluent Description Representation
Return Value an Integer

PlayerAPI.isOnGround

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns whether or not this entity is currently on the ground
overload 1:
player:isOnGround()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.getTargetedBlock

Inherited from LivingEntityAPI

Returns a proxy for your currently targeted BlockState
This BlockState appears on the F3 screen
The maximum (and default) distance is 20,
minimum is -20
Returns the block, the hit position,
and the targeted block face as three separate values
overload 1:
player:getTargetedBlock()
Method Property Fluent Description Representation
Return Value a Varargs
overload 2:
player:getTargetedBlock(ignoreLiquids)
Method Property Fluent Description Representation
ignoreLiquids accepts a Boolean
Return Value a Varargs
overload 3:
player:getTargetedBlock(ignoreLiquids, distance)
Method Property Fluent Description Representation
ignoreLiquids accepts a Boolean
distance accepts a Number
Return Value a Varargs

PlayerAPI.hasInventory

Inherited from LivingEntityAPI

Checks if the entity has an inventory (Horses, Camels, LLamas, …)
overload 1:
player:hasInventory()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.getTargetedEntity

Inherited from LivingEntityAPI

Returns a proxy for your currently targeted Entity
This Entity appears on the F3 screen
Maximum and Default distance is 20,
Minimum is 0
overload 1:
player:getTargetedEntity()
Method Property Fluent Description Representation
Return Value a Varargs
overload 2:
player:getTargetedEntity(distance)
Method Property Fluent Description Representation
distance accepts a Number
Return Value a Varargs

PlayerAPI.hasContainer

Inherited from LivingEntityAPI

Checks if the entity has a container (Chest Boats, Minecarts with Chests, …)
overload 1:
player:hasContainer()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.getVariable

Inherited from LivingEntityAPI

Gets the value of a variable this entity stored in themselves using the Avatar API's store() function
overload 1:
player:getVariable()
Method Property Fluent Description Representation
Return Value anything
overload 2:
player:getVariable(key)
Method Property Fluent Description Representation
key accepts a String
Return Value anything

PlayerAPI.isGlowing

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns true if this entity is currently glowing
overload 1:
player:isGlowing()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.isUnderwater

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns true if this entity's eyes are touching water
overload 1:
player:isUnderwater()
Method Property Fluent Description Representation
Return Value a Boolean

PlayerAPI.getUUID

Inherited from LivingEntityAPI

Gets the UUID of the proxied entity
overload 1:
player:getUUID()
Method Property Fluent Description Representation
Return Value a String

PlayerAPI.getBoundingBox

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns the size of this entity's bounding box as a Vector3
{x,
y, z} are the width, height, and width
Minecraft entity hitboxes always have square bases
overload 1:
player:getBoundingBox()
Method Property Fluent Description Representation
Return Value a Vector3

PlayerAPI.getVehicle

Inherited from LivingEntityAPI

Example by JimmyHelp:
Returns a proxy for the entity that this player is currently riding
If the player isn't riding anything,
returns nil
overload 1:
player:getVehicle()
Method Property Fluent Description Representation
Return Value an EntityAPI

PlayerAPI.getPassengers

Inherited from LivingEntityAPI

Returns a List of entities of all passengers this entity has
overload 1:
player:getPassengers()
Method Property Fluent Description Representation
Return Value a table

PlayerAPI.getControllingPassenger

Inherited from LivingEntityAPI

Returns the entity that is controlling this entity
overload 1:
player:getControllingPassenger()
Method Property Fluent Description Representation
Return Value an EntityAPI

PlayerAPI.getControlledVehicle

Inherited from LivingEntityAPI

Return the vehicle that this entity is controlling
overload 1:
player:getControlledVehicle()
Method Property Fluent Description Representation
Return Value an EntityAPI
a a