Adds specified amount of experience to the current value.
amount to be added
Client-side only, use PlayerActor.addExperience instead.
Adds items to player's inventory, stacking them if possible.
item ID
item count
item data
Optional
extra: ItemExtraDataitem extra
Optional
preventDrop: booleanif set to false, function drops items that could not be added to player's inventory, destroys them otherwise
Client-side only, use PlayerActor.addItemToInventory instead.
Adds specified amount of level to the current value.
amount to be added
Client-side only, use PlayerActor.setLevel instead.
Changes current player position by specified vector.
Client-side only, use Entity.addPosition instead.
Updates current entity's velocity by specified values.
Client-side only, use Entity.addVelocity instead.
Decreases carried item count by specified number.
Optional
count: numberamount of items to decrease carried item by,
default value is 1
Client-side only, use PlayerActor.setInventorySlot or Entity.setCarriedItem instead.
An object that allows to manipulate player's exhaustion.
Consider using Player.getExhaustion and Player.setExhaustion.
An object that allows to manipulate player experience.
Consider using Player.getExperience, Player.setExperience, Player.addExperience.
An object that allows to manipulate player flying ability and state.
Consider using Player.getFlyingEnabled, Player.setFlyingEnabled, Player.getFlying, Player.setFlying.
armor slot ID, should be one of the EArmorType values.
Information about item in the specified armor slot.
Gets one of the player's abilities in a boolean form.
ability name constant, should be one of the EPlayerAbility constants
Current value of the ability in a boolean form.
Item in player's hand.
Current dimension numeric uid, one of the EDimension values or custom dimension ID.
Gets one of the player's abilities in a form of floating-point number.
ability name constant, should be one of the EPlayerAbility constants
Current value of the ability in a form of floating-point number.
Consider use Player.getInventorySlot instead.
slot ID, from 0 to 36
Information about item in the specified inventory slot.
Gets local player entity uid, which can be used in various client operations with player, like Player.getPointed.
-1
if there is no player, for example, on dedicated servers
Player's current offhand item information.
Fetches information about the objects player is currently pointing.
Gets player entity uid, which can be used in various server operations with player, like Player.addItemToInventory.
-1
if there is no player, for example, on dedicated servers
An object that allows to manipulate player's health.
Consider using Player.getHealth and Player.setHealth.
An object that allows to manipulate player's exhaustion.
Consider using Player.getHunger and Player.setHunger.
true
if specified entity is of player type, false
otherwise.
Works only with local player, use Entity.getType instead.
An object that allows to manipulate player level.
Consider using Player.getLevel, Player.setLevel, Player.addLevel.
An object that allows to manipulate player's saturation.
Consider using Player.getSaturation and Player.setSaturation.
An object that allows to manipulate player's score.
Consider using Player.getScore.
Sets some of the player's 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 EPlayerAbility constants
the value to be set for the ability; can be either boolean or number, depending on the ability
Client-side only, use PlayerActor.setPlayerBooleanAbility and PlayerActor.setPlayerFloatAbility instead.
Sets contents of the specified armor slot.
armor slot ID, should be one of the EArmorType values
item ID
item count
item data
Optional
extra: ItemExtraDataitem extra
Client-side only, use PlayerActor.setArmor instead.
Sets item in player's hand.
item ID
item count
item data
Optional
extra: ItemExtraDataitem extra
Client-side only, use PlayerActor.setInventorySlot or Entity.setCarriedItem instead.
Sets player's exhaustion.
exhaustion value to be set
Client-side only, use PlayerActor.setExhaustion instead.
Sets player's experience.
experience value to be set
Client-side only, use PlayerActor.setExperience instead.
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
Client-side only, use PlayerActor.setCanFly instead.
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.
Client-side only, use Entity.healEntity and Entity.damageEntity instead.
Sets player's hunger.
hunger value to be set
Client-side only, use PlayerActor.setHunger instead.
Sets contents of the specified inventory slot.
slot ID, from 0 to 36
item ID
item count
item data
Optional
extra: ItemExtraDataitem extra
Client-side only, use PlayerActor.setInventorySlot instead.
Sets player's level.
level value to be set
Client-side only, use PlayerActor.setLevel instead.
Sets current offhand item for the player.
item ID
item count
item data
Optional
extra: ItemExtraDataitem extra
Client-side only, use Entity.setOffhandItem instead.
Sets specified coordinates as player's position.
Client-side only, use Entity.setPosition instead.
Sets player's saturation.
saturation value to be set
Client-side only, use PlayerActor.setSaturation instead.
Set player's velocity using velocity vector.
velocity
velocity
velocity
Client-side only, use Entity.setVelocity instead.
Copyright © 2024 Nernar. Copyright © 2020 #mineprogramming. Built with ❤ and TypeDoc.
Module used to manipulate local 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 uid, call Player.getLocal or Player.getServer depends on usage. Most of the methods are client-side, use PlayerActor instead.