Adds specified amount of experience to the current value
amount to be added
Adds items to player's inventory, stacking them if possible
item id
item count
item data
item extra
Adds specified amount of level to the current value
amount to be added
Changes current player position by specified vector
Updates current entity's velocity by specified values
Decreases carried item count by specified number
amount of items to decrease carried item by, default value is 1
an object that allows to manipulate player's exhaustion
an object that allows to manipulate player experience
an object that allows to manipulate player flying ability and state
player's entity id that can be used with most of Entity function
armor slot id, should be one of the Native.ArmorType values
information about item in the specified armor slot
Gets one of the player's {@page Abilities} in a boolean form
ability name constant, should be one of the Native.PlayerAbility constants
the current value of the ability in a boolean form
item in player's hand
current dimension numeric id, one of the Native.Dimension values or custom dimension id
player's current exhaustion
player's current experience
Gets one of the player's {@page Abilities} in a form of floating-point number
ability name constant, should be one of the Native.PlayerAbility constants
the current value of the ability in a form of floating-point number
true if player is flying, false otherwise
true if player is allowed to fly, false otherwise
player's current health
player's current hunger
slot id, from 0 to 36
information about item in the specified inventory slot
player's current level
Fetches information about the objects player is currently pointing
current player's position
player's current saturation
player's current score
currently selected inventory slot, from 0 to 8
an object that allows to manipulate player's health
an object that allows to manipulate player's exhaustion
true if specified entity is of player type, false otherwise
an object that allows to manipulate player level
Resets player's camera if it was previously set to another entity
Resets view zoom to the default value
an object that allows to manipulate player's saturation
an object that allows to manipulate player's score
Sets some of the player's {@page Abilities}. If the argument is of type Boolean, sets the ability as the boolean one, otherwise as numeric one
ability name constant, should be one of the Native.PlayerAbility constants
the value to be set for the ability. Can be either boolean or number, depending on the ability
Sets contents of the specified armor slot
armor slot id, should be one of the Native.ArmorType values
item id
item count
item data
item extra
Sets player's camera to the specified entity
entity id
Sets item in player's hand
item id
item count
item data
item extra
Sets player's exhaustion
exhaustion value to be set
Sets player's experience
experience value to be set
Changes player's current flying state, call Player.setFlyingEnabled to be able to set this property to true
whether the player should fly or not
Enables or disables player's ability to fly
whether the player can fly or not
Sets view zoom, to reset value call Player.resetFov
view zoom, default zoom is about 70
Sets player's health
health value to be set
Sets player's hunger
hunger value to be set
Sets contents of the specified inventory slot
slot id, from 0 to 36
item id
item count
item data
item extra
Sets player's level
level value to be set
Sets specified coordinates as player's position
Sets player's saturation
saturation value to be set
Selects currently selected inventory slot
slot id to be selected, from 0 to 8
Set player's velocity using velocity vector
velocity
velocity
velocity
Generated using TypeDoc
Module used to manipulate player. Player is also an entity in Minecraft, so you can use all the functions from Entity module as well. To get player's entity id, call Player.get function