Player

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.entity.type.player.Player;

Extends

Player extends LivingEntity.

Implements

Player implements the following interfaces:

Nameable,EntityAccess,CommandSource,IAttachmentHolder

Undocumented Interfaces

IPlayerExtension,Attackable,ILivingEntityExtension,SyncedDataHolder,ScoreHolder,IEntityExtension,INBTSerializable<CompoundTag>

Members

Getter
Gets the abilities of the player.
script.zs
// Player.abilities as Abilities
myPlayer.abilities

Return Type: Abilities

abilities() as Abilities
Gets the abilities of the player.

Returns: The abilities of the player.

script.zs
// Player.abilities() as Abilities;
myPlayer.abilities();

Return Type: Abilities

Getter
Gets the absorption amount for this entity.
script.zs
// Player.absorptionAmount as float
myPlayer.absorptionAmount

Return Type: float

absorptionAmount() as float
Gets the absorption amount for this entity.

Returns: The absorption amount.

script.zs
// Player.absorptionAmount() as float;
myPlayer.absorptionAmount();

Return Type: float

Getter
Checks if the commands from this source should return failure messages
script.zs
// Player.acceptsFailure as bool
myPlayer.acceptsFailure

Return Type: bool

acceptsFailure() as bool
Checks if the commands from this source should return failure messages

Returns: True if the commands from this source should return failure messages, false otherwise.

script.zs
// Player.acceptsFailure() as bool;
myPlayer.acceptsFailure();

Return Type: bool

Getter
Checks if the commands from this source should return successful messages
script.zs
// Player.acceptsSuccess as bool
myPlayer.acceptsSuccess

Return Type: bool

acceptsSuccess() as bool
Checks if the commands from this source should return successful messages

Returns: True if the commands from this source should return successful messages, false otherwise.

script.zs
// Player.acceptsSuccess() as bool;
myPlayer.acceptsSuccess();

Return Type: bool

Getter
Gets the active effects.
script.zs
// Player.activeEffects as Collection<MobEffectInstance>
myPlayer.activeEffects

Return Type: Collection<MobEffectInstance>

activeEffects() as Collection<MobEffectInstance>
Gets the active effects.

Returns: The active effects.

script.zs
// Player.activeEffects() as Collection<MobEffectInstance>;
myPlayer.activeEffects();

Return Type: Collection<MobEffectInstance>

Getter
Gets a map of active effects.
script.zs
// Player.activeEffectsMap as MobEffectInstance[MobEffect]
myPlayer.activeEffectsMap

Return Type: MobEffectInstance[MobEffect]

activeEffectsMap() as MobEffectInstance[MobEffect]
Gets a map of active effects.

Returns: The active effects map.

script.zs
// Player.activeEffectsMap() as MobEffectInstance[MobEffect];
myPlayer.activeEffectsMap();

Return Type: MobEffectInstance[MobEffect]

addEffect(effectInstance as MobEffectInstance) as bool
Adds an effect to this entity.

Returns: True if the effect was added, false otherwise.

script.zs
// Player.addEffect(effectInstance as MobEffectInstance) as bool;
myPlayer.addEffect(myMobEffectInstance);

Parameters:

effectInstance Type: MobEffectInstance - The effect to add.

Return Type: bool

addEffect(effectInstance as MobEffectInstance, entity as Entity) as bool
Adds an effect to this entity.

Returns: True if the effect was added, false otherwise.

script.zs
// Player.addEffect(effectInstance as MobEffectInstance, entity as Entity) as bool;
myPlayer.addEffect(myMobEffectInstance, myEntity);

Parameters:

effectInstance Type: MobEffectInstance - The effect to add.
entity Type: Entity - The entity that is the source of the effect.

Return Type: bool

addItem(stack as ItemStack) as bool
Adds an item to the player's inventory.

Returns: Whether the item was added.

script.zs
// Player.addItem(stack as ItemStack) as bool;
myPlayer.addItem(myItemStack);

Parameters:

stack Type: ItemStack - The item to add.

Return Type: bool

addTag(tagName as string) as bool
Adds a tag to the entity, returning false if the entity has over 1024

Returns: true if the tag was added.

script.zs
// Player.addTag(tagName as string) as bool;
myPlayer.addTag(myString);

Parameters:

tagName Type: string - The name of the tag to add.

Return Type: bool

Getter
Gets the current air supply of the entity.
script.zs
// Player.airSupply as int
myPlayer.airSupply

Return Type: int

airSupply() as int
Gets the current air supply of the entity.

Returns: The current air supply of the entity.

script.zs
// Player.airSupply() as int;
myPlayer.airSupply();

Return Type: int

Getter
Gets all slots.
script.zs
// Player.allSlots as Iterable<ItemStack>
myPlayer.allSlots

Return Type: Iterable<ItemStack>

allSlots() as Iterable<ItemStack>
Gets all slots.

Returns: An iterable of item stacks representing all slots.

script.zs
// Player.allSlots() as Iterable<ItemStack>;
myPlayer.allSlots();

Return Type: Iterable<ItemStack>

Getter
Checks if the command source always accepts.
script.zs
// Player.alwaysAccepts as bool
myPlayer.alwaysAccepts

Return Type: bool

alwaysAccepts() as bool
Checks if the command source always accepts.

Returns: True if the command source always accepts, false otherwise.

script.zs
// Player.alwaysAccepts() as bool;
myPlayer.alwaysAccepts();

Return Type: bool

Getter
Gets the armor cover percentage for this entity.
This is a value from 0 to 1 that represents the percentage of the entity's body that is covered by armor.
script.zs
// Player.armorCoverPercentage as float
myPlayer.armorCoverPercentage

Return Type: float

armorCoverPercentage() as float
Gets the armor cover percentage for this entity.
This is a value from 0 to 1 that represents the percentage of the entity's body that is covered by armor.

Returns: The armor cover percentage.

script.zs
// Player.armorCoverPercentage() as float;
myPlayer.armorCoverPercentage();

Return Type: float

Getter
Gets this entity's armor items.
script.zs
// Player.armorSlots as Iterable<ItemStack>
myPlayer.armorSlots

Return Type: Iterable<ItemStack>

armorSlots() as Iterable<ItemStack>
Gets this entity's armor items.

Returns: An iterable of item stacks representing the armor items.

script.zs
// Player.armorSlots() as Iterable<ItemStack>;
myPlayer.armorSlots();

Return Type: Iterable<ItemStack>

Getter
Gets the armor value for this entity.
script.zs
// Player.armorValue as int
myPlayer.armorValue

Return Type: int

armorValue() as int
Gets the armor value for this entity.

Returns: The armor value.

script.zs
// Player.armorValue() as int;
myPlayer.armorValue();

Return Type: int

Getter
Gets how many arrows are currently in this entity.
script.zs
// Player.arrowCount as int
myPlayer.arrowCount

Return Type: int

arrowCount() as int
Gets how many arrows are currently in this entity.

Returns: The arrow count.

script.zs
// Player.arrowCount() as int;
myPlayer.arrowCount();

Return Type: int

attack(entity as Entity)
Attacks an entity.
script.zs
// Player.attack(entity as Entity);
myPlayer.attack(myEntity);

Parameters:

entity Type: Entity - The entity to attack.
Getter
Checks if the entity is attackable.
script.zs
// Player.attackable as bool
myPlayer.attackable

Return Type: bool

attackable() as bool
Checks if the entity is attackable.

Returns: True if the entity is attackable, false otherwise.

script.zs
// Player.attackable() as bool;
myPlayer.attackable();

Return Type: bool

awardStat(stat as ResourceLocation)
Awards a stat to the player.
script.zs
// Player.awardStat(stat as ResourceLocation);
myPlayer.awardStat(myResourceLocation);

Parameters:

stat Type: ResourceLocation - The stat to award.
awardStat(stat as ResourceLocation, amount as int)
Awards a stat to the player.
script.zs
// Player.awardStat(stat as ResourceLocation, amount as int);
myPlayer.awardStat(myResourceLocation, myInt);

Parameters:

stat Type: ResourceLocation - The stat to award.
amount Type: int - The amount to award.
Getter
Gets the height of the bounding box of the entity.
script.zs
// Player.bbHeight as float
myPlayer.bbHeight

Return Type: float

bbHeight() as float
Gets the height of the bounding box of the entity.

Returns: The height of the bounding box of the entity.

script.zs
// Player.bbHeight() as float;
myPlayer.bbHeight();

Return Type: float

Getter
Gets the width of the bounding box of the entity.
script.zs
// Player.bbWidth as float
myPlayer.bbWidth

Return Type: float

bbWidth() as float
Gets the width of the bounding box of the entity.

Returns: The width of the bounding box of the entity.

script.zs
// Player.bbWidth() as float;
myPlayer.bbWidth();

Return Type: float

Getter
Gets the orientation of the bed that the entity is sleeping on.
script.zs
// Player.bedOrientation as Direction
myPlayer.bedOrientation

Return Type: Direction

bedOrientation() as Direction
Gets the orientation of the bed that the entity is sleeping on.

Returns: The orientation of the bed that the entity is sleeping on.

script.zs
// Player.bedOrientation() as Direction;
myPlayer.bedOrientation();

Return Type: Direction

Getter
Gets the BlockPos of the entity.
script.zs
// Player.blockPosiion as BlockPos
myPlayer.blockPosiion

Return Type: BlockPos

blockPosiion() as BlockPos
Gets the BlockPos of the entity.

Returns: The BlockPos of the entity.

script.zs
// Player.blockPosiion() as BlockPos;
myPlayer.blockPosiion();

Return Type: BlockPos

Getter
Gets the position of the entity.
script.zs
// Player.blockPosition as BlockPos
myPlayer.blockPosition

Return Type: BlockPos

blockPosition() as BlockPos
Gets the position of the entity.

Returns: The block position of the entity.

script.zs
// Player.blockPosition() as BlockPos;
myPlayer.blockPosition();

Return Type: BlockPos

Getter
Gets the x coordinate of the entity.
script.zs
// Player.blockX as int
myPlayer.blockX

Return Type: int

blockX() as int
Gets the x coordinate of the entity.

Returns: The x coordinate of the entity.

script.zs
// Player.blockX() as int;
myPlayer.blockX();

Return Type: int

Getter
Gets the y coordinate of the entity.
script.zs
// Player.blockY as int
myPlayer.blockY

Return Type: int

blockY() as int
Gets the y coordinate of the entity.

Returns: The y coordinate of the entity.

script.zs
// Player.blockY() as int;
myPlayer.blockY();

Return Type: int

Getter
Gets the z coordinate of the entity.
script.zs
// Player.blockZ as int
myPlayer.blockZ

Return Type: int

blockZ() as int
Gets the z coordinate of the entity.

Returns: The z coordinate of the entity.

script.zs
// Player.blockZ() as int;
myPlayer.blockZ();

Return Type: int

Getter
Gets the bounding box of the entity.
script.zs
// Player.boundingBox as AABB
myPlayer.boundingBox

Return Type: AABB

boundingBox() as AABB
Gets the bounding box of the entity.

Returns: The bounding box of the entity.

script.zs
// Player.boundingBox() as AABB;
myPlayer.boundingBox();

Return Type: AABB

Getter
Gets the bounding box for culling of the entity.
script.zs
// Player.boundingBoxForCulling as AABB
myPlayer.boundingBoxForCulling

Return Type: AABB

boundingBoxForCulling() as AABB
Gets the bounding box for culling of the entity.

Returns: The bounding box for culling of the entity.

script.zs
// Player.boundingBoxForCulling() as AABB;
myPlayer.boundingBoxForCulling();

Return Type: AABB

canAttack(target as LivingEntity) as bool
Checks if this entity can attack a target.

Returns: True if this entity can attack the target, false otherwise.

script.zs
// Player.canAttack(target as LivingEntity) as bool;
myPlayer.canAttack(myLivingEntity);

Parameters:

target Type: LivingEntity - The target to check if this entity can attack.

Return Type: bool

canBeAffected(effectInstance as MobEffectInstance) as bool
Checks if this entity can be affected by a specific effect.

Returns: True if this entity can be affected by the effect, false otherwise.

script.zs
// Player.canBeAffected(effectInstance as MobEffectInstance) as bool;
myPlayer.canBeAffected(myMobEffectInstance);

Parameters:

effectInstance Type: MobEffectInstance - The effect to check if this entity can be affected by.

Return Type: bool

Getter
Checks if the entity can be collided with.
script.zs
// Player.canBeCollidedWith as bool
myPlayer.canBeCollidedWith

Return Type: bool

canBeCollidedWith() as bool
Checks if the entity can be collided with.

Returns: true if the entity can be collided with.

script.zs
// Player.canBeCollidedWith() as bool;
myPlayer.canBeCollidedWith();

Return Type: bool

Getter
Checks if this entity can be seen as an enemy. Some things this checks are if this entity is a player and it is in creative mode, or if this entity is an axolotl if it is playing dead.
script.zs
// Player.canBeSeenAsEnemy as bool
myPlayer.canBeSeenAsEnemy

Return Type: bool

canBeSeenAsEnemy() as bool
Checks if this entity can be seen as an enemy. Some things this checks are if this entity is a player and it is in creative mode, or if this entity is an axolotl if it is playing dead.

Returns: True if this entity can be seen as an enemy, false otherwise.

script.zs
// Player.canBeSeenAsEnemy() as bool;
myPlayer.canBeSeenAsEnemy();

Return Type: bool

Getter
Checks if this entity can be seen by anyone.
script.zs
// Player.canBeSeenByAnyone as bool
myPlayer.canBeSeenByAnyone

Return Type: bool

canBeSeenByAnyone() as bool
Checks if this entity can be seen by anyone.

Returns: True if this entity can be seen by anyone, false otherwise.

script.zs
// Player.canBeSeenByAnyone() as bool;
myPlayer.canBeSeenByAnyone();

Return Type: bool

Getter
Checks if this entity can breathe underwater.
script.zs
// Player.canBreatheUnderwater as bool
myPlayer.canBreatheUnderwater

Return Type: bool

canBreatheUnderwater() as bool
Checks if this entity can breathe underwater.

Returns: True if the entity can breathe underwater, false otherwise.

script.zs
// Player.canBreatheUnderwater() as bool;
myPlayer.canBreatheUnderwater();

Return Type: bool

canCollideWith(other as Entity) as bool
Checks if the entity can collide with the given entity.

Returns: true if the entity can collide with the given entity.

script.zs
// Player.canCollideWith(other as Entity) as bool;
myPlayer.canCollideWith(myEntity);

Parameters:

other Type: Entity - The entity to check if the entity can collide with.

Return Type: bool

canEat(ignoreHunger as bool) as bool
Checks if the player can eat.

Returns: Whether the player can eat.

script.zs
// Player.canEat(ignoreHunger as bool) as bool;
myPlayer.canEat(myBool);

Parameters:

ignoreHunger Type: bool - Whether to ignore hunger.

Return Type: bool

Getter
Checks if the entity can freeze.
script.zs
// Player.canFreeze as bool
myPlayer.canFreeze

Return Type: bool

canFreeze() as bool
Checks if the entity can freeze.

Returns: Whether the entity can freeze.

script.zs
// Player.canFreeze() as bool;
myPlayer.canFreeze();

Return Type: bool

canHarmPlayer(player as Player) as bool
Checks if the player can harm another player.
This does not check if pvp is enabled, it checks if players are on the same scoreboard team.

Returns: Whether the player can harm the other player.

script.zs
// Player.canHarmPlayer(player as Player) as bool;
myPlayer.canHarmPlayer(myPlayer);

Parameters:

player Type: Player - The player to check.

Return Type: bool

canStandOnFluid(fluid as Fluid) as bool
Checks if the entity can stand on a specific fluid.

Returns: True if the entity can stand on the fluid, false otherwise.

script.zs
// Player.canStandOnFluid(fluid as Fluid) as bool;
myPlayer.canStandOnFluid(myFluid);

Parameters:

fluid Type: Fluid - The fluid to check.

Return Type: bool

canTakeItem(stack as ItemStack) as bool
Checks if the item can be worn as armor.

Returns: True if the item can be worn as armor, false otherwise.

script.zs
// Player.canTakeItem(stack as ItemStack) as bool;
myPlayer.canTakeItem(myItemStack);

Parameters:

stack Type: ItemStack - The item to check.

Return Type: bool

Getter
Checks if the player can use game master blocks such as command blocks.
script.zs
// Player.canUseGameMasterBlocks as bool
myPlayer.canUseGameMasterBlocks

Return Type: bool

canUseGameMasterBlocks() as bool
Checks if the player can use game master blocks such as command blocks.

Returns: Whether the player can use game master blocks.

script.zs
// Player.canUseGameMasterBlocks() as bool;
myPlayer.canUseGameMasterBlocks();

Return Type: bool

causeFoodExhaustion(exhaustion as float)
Adds food exhaustion to the player.
script.zs
// Player.causeFoodExhaustion(exhaustion as float);
myPlayer.causeFoodExhaustion(myFloat);

Parameters:

exhaustion Type: float - The amount of exhaustion to add.
clearFire()
Clears the fire of the entity.
script.zs
// Player.clearFire();
myPlayer.clearFire();
clearSleepingPos()
Clears the position that the entity is sleeping at.
script.zs
// Player.clearSleepingPos();
myPlayer.clearSleepingPos();
closerThan(other as Entity, distance as double) as bool
Checks if the entity is closer than the given distance to another entity.

Returns: true if the entity is closer than the given distance to the other entity.

script.zs
// Player.closerThan(other as Entity, distance as double) as bool;
myPlayer.closerThan(myEntity, myDouble);

Parameters:

other Type: Entity - The other entity to check the distance to.
distance Type: double - The distance to check.

Return Type: bool

Getter
Gets the Level used when sending commands as this entity.
script.zs
// Player.commandSenderWorld as Level
myPlayer.commandSenderWorld

Return Type: Level

commandSenderWorld() as Level
Gets the Level used when sending commands as this entity.

Returns: The Level used when sending commands as this entity.

script.zs
// Player.commandSenderWorld() as Level;
myPlayer.commandSenderWorld();

Return Type: Level

Getter
Gets the controlling passenger of the entity.
script.zs
// Player.controllingPassenger as Entity
myPlayer.controllingPassenger

Return Type: Entity

controllingPassenger() as Entity
Gets the controlling passenger of the entity.

Returns: The controlling passenger of the entity.

script.zs
// Player.controllingPassenger() as Entity;
myPlayer.controllingPassenger();

Return Type: Entity

Getter
Gets the cooldowns of the player.
script.zs
// Player.cooldowns as ItemCooldowns
myPlayer.cooldowns

Return Type: ItemCooldowns

cooldowns() as ItemCooldowns
Gets the cooldowns of the player.

Returns: The cooldowns of the player.

script.zs
// Player.cooldowns() as ItemCooldowns;
myPlayer.cooldowns();

Return Type: ItemCooldowns

crit(entity as Entity)
Spawns critical hit particle at the hit entity.
script.zs
// Player.crit(entity as Entity);
myPlayer.crit(myEntity);

Parameters:

entity Type: Entity - The entity to hit.
Getter
Gets the current item attack strength delay of the player.
script.zs
// Player.currentItemAttackStrengthDelay as float
myPlayer.currentItemAttackStrengthDelay

Return Type: float

currentItemAttackStrengthDelay() as float
Gets the current item attack strength delay of the player.

Returns: The current item attack strength delay of the player.

script.zs
// Player.currentItemAttackStrengthDelay() as float;
myPlayer.currentItemAttackStrengthDelay();

Return Type: float

Getter
Gets the custom NBT data for this Entity.
script.zs
// Player.customData as MapData
myPlayer.customData

Return Type: MapData

customData() as MapData
Gets the custom NBT data for this Entity.

Returns: The custom data for this Entity.

script.zs
// Player.customData() as MapData;
myPlayer.customData();

Return Type: MapData

Getter
Gets the custom name of the entity.
script.zs
// Player.customName as Component
myPlayer.customName

Return Type: Component

Getter
script.zs
// Player.customName as Component
myPlayer.customName

Return Type: Component

customName() as Component
Gets the custom name of the entity.

Returns: The custom name of the entity.

script.zs
// Player.customName() as Component;
myPlayer.customName();

Return Type: Component

customName() as Component
script.zs
// Player.customName() as Component;
myPlayer.customName();

Return Type: Component

Getter
Checks if the entity dampens vibrations, such as net.minecraft.world.entity.item.ItemEntitys who's item is in the dampens_vibrations item tag.
script.zs
// Player.dampensVibrations as bool
myPlayer.dampensVibrations

Return Type: bool

dampensVibrations() as bool
Checks if the entity dampens vibrations, such as net.minecraft.world.entity.item.ItemEntitys who's item is in the dampens_vibrations item tag.

Returns: true if the entity dampens vibrations.

script.zs
// Player.dampensVibrations() as bool;
myPlayer.dampensVibrations();

Return Type: bool

Getter
Gets the NBT data of this Entity.
script.zs
// Player.data as MapData
myPlayer.data

Return Type: MapData

data() as MapData
Gets the NBT data of this Entity.

Returns: The NBT data of this Entity.

script.zs
// Player.data() as MapData;
myPlayer.data();

Return Type: MapData

Getter
Gets the delta movement of the entity.
script.zs
// Player.deltaMovement as Vec3
myPlayer.deltaMovement

Return Type: Vec3

Setter
Sets the delta movement of the entity.
script.zs
// Player.deltaMovement = (deltaMovement as Vec3);
myPlayer.deltaMovement = myVec3;

Parameters:

deltaMovement Type: Vec3 - The delta movement to set.
deltaMovement() as Vec3
Gets the delta movement of the entity.

Returns: The delta movement of the entity.

script.zs
// Player.deltaMovement() as Vec3;
myPlayer.deltaMovement();

Return Type: Vec3

deltaMovement(deltaMovement as Vec3)
Sets the delta movement of the entity.
script.zs
// Player.deltaMovement(deltaMovement as Vec3);
myPlayer.deltaMovement(myVec3);

Parameters:

deltaMovement Type: Vec3 - The delta movement to set.
die(source as DamageSource)
Kills this entity.
script.zs
// Player.die(source as DamageSource);
myPlayer.die(myDamageSource);

Parameters:

source Type: DamageSource - The damage source that killed this entity.
Getter
Gets the dimension changing delay of the entity.
script.zs
// Player.dimensionChangingDelay as int
myPlayer.dimensionChangingDelay

Return Type: int

dimensionChangingDelay() as int
Gets the dimension changing delay of the entity.

Returns: The dimension changing delay of the entity.

script.zs
// Player.dimensionChangingDelay() as int;
myPlayer.dimensionChangingDelay();

Return Type: int

Getter
Gets the direction of the entity.
script.zs
// Player.direction as Direction
myPlayer.direction

Return Type: Direction

direction() as Direction
Gets the direction of the entity.

Returns: The direction of the entity.

script.zs
// Player.direction() as Direction;
myPlayer.direction();

Return Type: Direction

disableShield()
Disables the shield of the player.
script.zs
// Player.disableShield();
myPlayer.disableShield();
discard()
Discards the entity.
script.zs
// Player.discard();
myPlayer.discard();
Getter
Checks if the entity dismounts underwater.
script.zs
// Player.dismountsUnderwater as bool
myPlayer.dismountsUnderwater

Return Type: bool

dismountsUnderwater() as bool
Checks if the entity dismounts underwater.

Returns: true if the entity dismounts underwater.

script.zs
// Player.dismountsUnderwater() as bool;
myPlayer.dismountsUnderwater();

Return Type: bool

displayClientMessage(component as Component, actionBar as bool)
Displays a message to the client.
script.zs
// Player.displayClientMessage(component as Component, actionBar as bool);
myPlayer.displayClientMessage(myComponent, myBool);

Parameters:

component Type: Component - The message to display.
actionBar Type: bool - Whether to display the message in the action bar.
Getter
Gets the display name of the entity.
script.zs
// Player.displayName as Component
myPlayer.displayName

Return Type: Component

Getter
script.zs
// Player.displayName as Component
myPlayer.displayName

Return Type: Component

displayName() as Component
Gets the display name of the entity.

Returns: The display name of the entity.

script.zs
// Player.displayName() as Component;
myPlayer.displayName();

Return Type: Component

displayName() as Component
script.zs
// Player.displayName() as Component;
myPlayer.displayName();

Return Type: Component

distanceTo(entity as Entity) as float
Gets the distance to the given entity.

Returns: The distance to the given entity.

script.zs
// Player.distanceTo(entity as Entity) as float;
myPlayer.distanceTo(myEntity);

Parameters:

entity Type: Entity - The entity to get the distance to.

Return Type: float

distanceToSqr(x as double, y as double, z as double) as double
Gets the squared distance to the given position.

Returns: The squared distance to the given position.

script.zs
// Player.distanceToSqr(x as double, y as double, z as double) as double;
myPlayer.distanceToSqr(myDouble, myDouble, myDouble);

Parameters:

x Type: double - The x position to get the squared distance to.
y Type: double - The y position to get the squared distance to.
z Type: double - The z position to get the squared distance to.

Return Type: double

distanceToSqr(entity as Entity) as double
Gets the squared distance to the given entity.

Returns: The squared distance to the given entity.

script.zs
// Player.distanceToSqr(entity as Entity) as double;
myPlayer.distanceToSqr(myEntity);

Parameters:

entity Type: Entity - The entity to get the squared distance to.

Return Type: double

distanceToSqr(vec as Vec3) as double
Gets the squared distance to the given vector.

Returns: The squared distance to the given vector.

script.zs
// Player.distanceToSqr(vec as Vec3) as double;
myPlayer.distanceToSqr(myVec3);

Parameters:

vec Type: Vec3 - The vector to get the squared distance to.

Return Type: double

doHurtTarget(entity as Entity) as bool
script.zs
// Player.doHurtTarget(entity as Entity) as bool;
myPlayer.doHurtTarget(myEntity);

Parameters:

entity Type: Entity

Return Type: bool

drop(stack as ItemStack, traceItem as bool) as ItemEntity
Drops an item in the world as if the player dropped it.

Returns: The item entity that was dropped.

script.zs
// Player.drop(stack as ItemStack, traceItem as bool) as ItemEntity;
myPlayer.drop(myItemStack, myBool);

Parameters:

stack Type: ItemStack - The item to drop.
traceItem Type: bool - Whether to trace the item.

Return Type: ItemEntity

eat(level as Level, stack as ItemStack) as ItemStack
Eats an item.

Returns: The item that the entity ate.

script.zs
// Player.eat(level as Level, stack as ItemStack) as ItemStack;
myPlayer.eat(myLevel, myItemStack);

Parameters:

level Type: Level - The level that the entity is in.
stack Type: ItemStack - The item to eat.

Return Type: ItemStack

ejectPassengers()
Ejects the passengers of the entity.
script.zs
// Player.ejectPassengers();
myPlayer.ejectPassengers();
Getter
Gets the enchantment seed of the player.
script.zs
// Player.enchantmentSeed as int
myPlayer.enchantmentSeed

Return Type: int

enchantmentSeed() as int
Gets the enchantment seed of the player.

Returns: The enchantment seed of the player.

script.zs
// Player.enchantmentSeed() as int;
myPlayer.enchantmentSeed();

Return Type: int

Getter
Gets the experience level of the player.
script.zs
// Player.experienceLevel as int
myPlayer.experienceLevel

Return Type: int

Setter
Sets the experience level of the player.
script.zs
// Player.experienceLevel = (level as int);
myPlayer.experienceLevel = myInt;

Parameters:

level Type: int - The experience level to set.
experienceLevel() as int
Gets the experience level of the player.

Returns: The experience level of the player.

script.zs
// Player.experienceLevel() as int;
myPlayer.experienceLevel();

Return Type: int

experienceLevel(level as int)
Sets the experience level of the player.
script.zs
// Player.experienceLevel(level as int);
myPlayer.experienceLevel(myInt);

Parameters:

level Type: int - The experience level to set.
Getter
Gets the eye height of the entity.
script.zs
// Player.eyeHeight as float
myPlayer.eyeHeight

Return Type: float

eyeHeight() as float
Gets the eye height of the entity.

Returns: The eye height of the entity.

script.zs
// Player.eyeHeight() as float;
myPlayer.eyeHeight();

Return Type: float

Getter
Gets the eye position of the entity.
script.zs
// Player.eyePosition as Vec3
myPlayer.eyePosition

Return Type: Vec3

eyePosition() as Vec3
Gets the eye position of the entity.

Returns: The eye position of the entity.

script.zs
// Player.eyePosition() as Vec3;
myPlayer.eyePosition();

Return Type: Vec3

Getter
Gets the y coordinate of the entity's eyes.
script.zs
// Player.eyeY as double
myPlayer.eyeY

Return Type: double

eyeY() as double
Gets the y coordinate of the entity's eyes.

Returns: The y coordinate of the entity's eyes.

script.zs
// Player.eyeY() as double;
myPlayer.eyeY();

Return Type: double

Getter
Gets the ticks that the entity has been flying with an elytra.
script.zs
// Player.fallFlyingTicks as int
myPlayer.fallFlyingTicks

Return Type: int

fallFlyingTicks() as int
Gets the ticks that the entity has been flying with an elytra.

Returns: The ticks that the entity has been flying with an elytra.

script.zs
// Player.fallFlyingTicks() as int;
myPlayer.fallFlyingTicks();

Return Type: int

Getter
Checks if the entity is fire immune.
script.zs
// Player.fireImmune as bool
myPlayer.fireImmune

Return Type: bool

fireImmune() as bool
Checks if the entity is fire immune.

Returns: true if the entity is fire immune.

script.zs
// Player.fireImmune() as bool;
myPlayer.fireImmune();

Return Type: bool

Getter
Gets the remaining fire ticks of the entity.
script.zs
// Player.fireTicks as int
myPlayer.fireTicks

Return Type: int

Setter
Sets the remaining fire ticks of the entity.
script.zs
// Player.fireTicks = (ticks as int);
myPlayer.fireTicks = myInt;

Parameters:

ticks Type: int - The number of ticks to set the remaining fire ticks to.
fireTicks(ticks as int)
Sets the remaining fire ticks of the entity.
script.zs
// Player.fireTicks(ticks as int);
myPlayer.fireTicks(myInt);

Parameters:

ticks Type: int - The number of ticks to set the remaining fire ticks to.
fireTicks() as int
Gets the remaining fire ticks of the entity.

Returns: The remaining fire ticks of the entity.

script.zs
// Player.fireTicks() as int;
myPlayer.fireTicks();

Return Type: int

Getter
Gets the first passenger of the entity.
script.zs
// Player.firstPassenger as Entity
myPlayer.firstPassenger

Return Type: Entity

firstPassenger() as Entity
Gets the first passenger of the entity.

Returns: The first passenger of the entity.

script.zs
// Player.firstPassenger() as Entity;
myPlayer.firstPassenger();

Return Type: Entity

Getter
Gets the fluid jump threshold of the entity.
script.zs
// Player.fluidJumpThreshold as double
myPlayer.fluidJumpThreshold

Return Type: double

fluidJumpThreshold() as double
Gets the fluid jump threshold of the entity.

Returns: The fluid jump threshold of the entity.

script.zs
// Player.fluidJumpThreshold() as double;
myPlayer.fluidJumpThreshold();

Return Type: double

Getter
Gets the food data of the player.
script.zs
// Player.foodData as FoodData
myPlayer.foodData

Return Type: FoodData

foodData() as FoodData
Gets the food data of the player.

Returns: The food data of the player.

script.zs
// Player.foodData() as FoodData;
myPlayer.foodData();

Return Type: FoodData

forceAddEffect(effectInstance as MobEffectInstance, entity as Entity)
Forces this entity to have a specific effect, this does not force effects that can't affect this entity.
script.zs
// Player.forceAddEffect(effectInstance as MobEffectInstance, entity as Entity);
myPlayer.forceAddEffect(myMobEffectInstance, myEntity);

Parameters:

effectInstance Type: MobEffectInstance - The effect to force this entity to have.
entity Type: Entity - The entity that is the source of the effect.
Getter
Gets the forward vector of the entity.
script.zs
// Player.forward as Vec3
myPlayer.forward

Return Type: Vec3

forward() as Vec3
Gets the forward vector of the entity.

Returns: The forward vector of the entity.

script.zs
// Player.forward() as Vec3;
myPlayer.forward();

Return Type: Vec3

getAttachmentData(type as AttachmentType<T>) as T
script.zs
// Player.getAttachmentData<T>(type as AttachmentType<T>) as T;
myPlayer.getAttachmentData<T>(myAttachmentType);

Parameters:

type Type: AttachmentType<T>

Return Type: T

getAttachmentData(type as Supplier<AttachmentType<T>>) as T
script.zs
// Player.getAttachmentData<T>(type as Supplier<AttachmentType<T>>) as T;
myPlayer.getAttachmentData<T>(mySupplier);

Parameters:

type Type: Supplier<AttachmentType<T>>

Return Type: T

getAttribute(attribute as Attribute) as AttributeInstance
Gets the attribute for this entity.

Returns: The attribute.

script.zs
// Player.getAttribute(attribute as Attribute) as AttributeInstance;
myPlayer.getAttribute(myAttribute);

Parameters:

attribute Type: Attribute - The attribute to get.

Return Type: AttributeInstance

getAttributeBaseValue(attribute as Attribute) as double
Gets the base attribute value for this entity.

Returns: The base attribute value.

script.zs
// Player.getAttributeBaseValue(attribute as Attribute) as double;
myPlayer.getAttributeBaseValue(myAttribute);

Parameters:

attribute Type: Attribute - The attribute to get the base value of.

Return Type: double

getAttributeValue(attribute as Attribute) as double
Gets the attribute value for this entity.

Returns: The attribute value.

script.zs
// Player.getAttributeValue(attribute as Attribute) as double;
myPlayer.getAttributeValue(myAttribute);

Parameters:

attribute Type: Attribute - The attribute to get the value of.

Return Type: double

getDestroySpeed(state as BlockState) as float
Gets the destroy speed of the player for a given BlockState.

Returns: The destroy speed of the player for the given block state.

script.zs
// Player.getDestroySpeed(state as BlockState) as float;
myPlayer.getDestroySpeed(myBlockState);

Parameters:

state Type: BlockState - The block state to get the destroy speed for.

Return Type: float

getEffect(effect as MobEffect) as MobEffectInstance
Gets the MobEffectInstance for the given effect on this entity.

Returns: The effect instance.

script.zs
// Player.getEffect(effect as MobEffect) as MobEffectInstance;
myPlayer.getEffect(myMobEffect);

Parameters:

effect Type: MobEffect - The effect to get.

Return Type: MobEffectInstance

getEyePosition(partialTicks as float) as Vec3
Gets the eye position of the entity.

Returns: The eye position of the entity.

script.zs
// Player.getEyePosition(partialTicks as float) as Vec3;
myPlayer.getEyePosition(myFloat);

Parameters:

partialTicks Type: float - The partial ticks to get the eye position for.

Return Type: Vec3

getItemBySlot(slot as EquipmentSlot) as ItemStack
Gets the item in a specific slot.

Returns: The item in the slot.

script.zs
// Player.getItemBySlot(slot as EquipmentSlot) as ItemStack;
myPlayer.getItemBySlot(myEquipmentSlot);

Parameters:

slot Type: EquipmentSlot - The slot to get the item from.

Return Type: ItemStack

getItemInHand(hand as InteractionHand) as ItemStack
Gets the item in the entity's hand.

Returns: The item in the hand.

script.zs
// Player.getItemInHand(hand as InteractionHand) as ItemStack;
myPlayer.getItemInHand(myInteractionHand);

Parameters:

hand Type: InteractionHand - The hand to get the item from.

Return Type: ItemStack

getPosition(partialTicks as float) as Vec3
Gets the position of the entity.

Returns: The position of the entity.

script.zs
// Player.getPosition(partialTicks as float) as Vec3;
myPlayer.getPosition(myFloat);

Parameters:

partialTicks Type: float - The partial ticks to get the position for.

Return Type: Vec3

getSwimAmount(partialTicks as float) as float
Gets the swim amount.

Returns: The swim amount.

script.zs
// Player.getSwimAmount(partialTicks as float) as float;
myPlayer.getSwimAmount(myFloat);

Parameters:

partialTicks Type: float - The partial ticks to get the swim amount for.

Return Type: float

getUpVector(partialTicks as float) as Vec3
Gets the up vector of the entity.

Returns: The up vector of the entity.

script.zs
// Player.getUpVector(partialTicks as float) as Vec3;
myPlayer.getUpVector(myFloat);

Parameters:

partialTicks Type: float - The partial ticks to get the up vector for.

Return Type: Vec3

getViewVector(partialTicks as float) as Vec3
Gets the view vector of the entity.

Returns: The view vector of the entity.

script.zs
// Player.getViewVector(partialTicks as float) as Vec3;
myPlayer.getViewVector(myFloat);

Parameters:

partialTicks Type: float - The partial ticks to get the view vector for.

Return Type: Vec3

getVisibilityPercent(lookingEntity as Entity) as double
Gets the visibility percent for this entity.

Returns: The visibility percent.

script.zs
// Player.getVisibilityPercent(lookingEntity as Entity) as double;
myPlayer.getVisibilityPercent(myEntity);

Parameters:

lookingEntity Type: Entity - The entity that is looking at this entity.

Return Type: double

getX(scale as double) as double
Gets the x coordinate of the entity with the given scale.

Returns: The x coordinate of the entity.

script.zs
// Player.getX(scale as double) as double;
myPlayer.getX(myDouble);

Parameters:

scale Type: double - The scale to get the x coordinate of the entity.

Return Type: double

getY(scale as double) as double
Gets the y coordinate of the entity with the given scale.

Returns: The y coordinate of the entity.

script.zs
// Player.getY(scale as double) as double;
myPlayer.getY(myDouble);

Parameters:

scale Type: double - The scale to get the y coordinate of the entity.

Return Type: double

getZ(scale as double) as double
Gets the z coordinate of the entity with the given scale.

Returns: The z coordinate of the entity.

script.zs
// Player.getZ(scale as double) as double;
myPlayer.getZ(myDouble);

Parameters:

scale Type: double - The scale to get the z coordinate of the entity.

Return Type: double

give(stack as IItemStack, slot as int = -1)
Gives the player an item.
script.zs
// Player.give(stack as IItemStack, slot as int = -1);
myPlayer.give(myIItemStack, myInt);

Parameters:

stack Type: IItemStack - The item to give.
slot (optional) Type: int - The slot to give the item to.

Default Value: -1

giveExperienceLevels(levels as int)
Gives the player experience levels.
script.zs
// Player.giveExperienceLevels(levels as int);
myPlayer.giveExperienceLevels(myInt);

Parameters:

levels Type: int - The amount of experience levels to give.
giveExperiencePoints(amount as int)
Gives the player experience points.
script.zs
// Player.giveExperiencePoints(amount as int);
myPlayer.giveExperiencePoints(myInt);

Parameters:

amount Type: int - The amount of experience to give.
Getter
Gets this entity's held items.
script.zs
// Player.handSlots as Iterable<ItemStack>
myPlayer.handSlots

Return Type: Iterable<ItemStack>

handSlots() as Iterable<ItemStack>
Gets this entity's held items.

Returns: An iterable of item stacks representing the held items.

script.zs
// Player.handSlots() as Iterable<ItemStack>;
myPlayer.handSlots();

Return Type: Iterable<ItemStack>

hasAttachmentData(type as AttachmentType<T>) as bool
script.zs
// Player.hasAttachmentData<T>(type as AttachmentType<T>) as bool;
myPlayer.hasAttachmentData<T>(myAttachmentType);

Parameters:

type Type: AttachmentType<T>

Return Type: bool

hasAttachmentData(type as Supplier<AttachmentType<T>>) as bool
script.zs
// Player.hasAttachmentData<T>(type as Supplier<AttachmentType<T>>) as bool;
myPlayer.hasAttachmentData<T>(mySupplier);

Parameters:

type Type: Supplier<AttachmentType<T>>

Return Type: bool

hasCorrectToolForDrops(state as BlockState) as bool
Checks if the player has the correct tool for the given BlockState.

Returns: Whether the player has the correct tool for the given block state.

script.zs
// Player.hasCorrectToolForDrops(state as BlockState) as bool;
myPlayer.hasCorrectToolForDrops(myBlockState);

Parameters:

state Type: BlockState - The block state to check.

Return Type: bool

Getter
Checks if the entity has a custom name.
script.zs
// Player.hasCustomName as bool
myPlayer.hasCustomName

Return Type: bool

Getter
script.zs
// Player.hasCustomName as bool
myPlayer.hasCustomName

Return Type: bool

hasCustomName() as bool
Checks if the entity has a custom name.

Returns: true if the entity has a custom name.

script.zs
// Player.hasCustomName() as bool;
myPlayer.hasCustomName();

Return Type: bool

hasCustomName() as bool
script.zs
// Player.hasCustomName() as bool;
myPlayer.hasCustomName();

Return Type: bool

hasEffect(effect as MobEffect) as bool
Checks if this entity has a specific effect.

Returns: True if this entity has the effect, false otherwise.

script.zs
// Player.hasEffect(effect as MobEffect) as bool;
myPlayer.hasEffect(myMobEffect);

Parameters:

effect Type: MobEffect - The effect to check if this entity has.

Return Type: bool

Getter
Checks if the entity has exactly one player passenger.
script.zs
// Player.hasExactlyOnePlayerPassenger as bool
myPlayer.hasExactlyOnePlayerPassenger

Return Type: bool

hasExactlyOnePlayerPassenger() as bool
Checks if the entity has exactly one player passenger.

Returns: true if the entity has exactly one player passenger.

script.zs
// Player.hasExactlyOnePlayerPassenger() as bool;
myPlayer.hasExactlyOnePlayerPassenger();

Return Type: bool

Getter
Checks if the entity is currently glowing.
script.zs
// Player.hasGlowingTag as bool
myPlayer.hasGlowingTag

Return Type: bool

hasGlowingTag() as bool
Checks if the entity is currently glowing.

Returns: true if the entity is currently glowing.

script.zs
// Player.hasGlowingTag() as bool;
myPlayer.hasGlowingTag();

Return Type: bool

hasIndirectPassenger(entity as Entity) as bool
Checks if the entity has an indirect passenger.

Returns: true if the entity has an indirect passenger.

script.zs
// Player.hasIndirectPassenger(entity as Entity) as bool;
myPlayer.hasIndirectPassenger(myEntity);

Parameters:

entity Type: Entity - The entity to check.

Return Type: bool

hasItemInSlot(slot as EquipmentSlot) as bool
Checks if the entity has an item in a specific slot.

Returns: True if the entity has an item in the slot, false otherwise.

script.zs
// Player.hasItemInSlot(slot as EquipmentSlot) as bool;
myPlayer.hasItemInSlot(myEquipmentSlot);

Parameters:

slot Type: EquipmentSlot - The slot to check.

Return Type: bool

hasLineOfSight(entity as Entity) as bool
Checks if this entity has a line of sight to a specific entity.

Returns: True if the entity has a line of sight to the entity, false otherwise.

script.zs
// Player.hasLineOfSight(entity as Entity) as bool;
myPlayer.hasLineOfSight(myEntity);

Parameters:

entity Type: Entity - The entity to check the line of sight to.

Return Type: bool

hasPassenger(entity as Entity) as bool
Checks if the entity has a passenger.

Returns: true if the entity has the given passenger.

script.zs
// Player.hasPassenger(entity as Entity) as bool;
myPlayer.hasPassenger(myEntity);

Parameters:

entity Type: Entity - The entity to check.

Return Type: bool

hasPassenger(predicate as function(t as Entity) as bool) as bool
Checks if the entity has a passenger that matches the given predicate.

Returns: true if the entity has a passenger that matches the predicate.

script.zs
// Player.hasPassenger(predicate as function(t as Entity) as bool) as bool;
myPlayer.hasPassenger(myPredicate);

Parameters:

predicate Type: function(t as Entity) as bool - The predicate to check.

Return Type: bool

heal(amount as float)
Heals this entity.
script.zs
// Player.heal(amount as float);
myPlayer.heal(myFloat);

Parameters:

amount Type: float - The amount to heal.
Getter
Gets the health of this entity.
script.zs
// Player.health as float
myPlayer.health

Return Type: float

health() as float
Gets the health of this entity.

Returns: The health of this entity.

script.zs
// Player.health() as float;
myPlayer.health();

Return Type: float

hurt(source as DamageSource, amount as float) as bool
Hurts the entity with the given DamageSource and amount.

Returns: true if the entity was hurt.

script.zs
// Player.hurt(source as DamageSource, amount as float) as bool;
myPlayer.hurt(myDamageSource, myFloat);

Parameters:

source Type: DamageSource - The DamageSource to hurt the entity with.
amount Type: float - The amount of damage to deal.

Return Type: bool

Getter
Gets the ID of the entity.
script.zs
// Player.id as int
myPlayer.id

Return Type: int

id() as int
Gets the ID of the entity.

Returns: The ID of the entity.

script.zs
// Player.id() as int;
myPlayer.id();

Return Type: int

Getter
Gets the BlockState that this entity is currently inside.
script.zs
// Player.inBlockState as BlockState
myPlayer.inBlockState

Return Type: BlockState

inBlockState() as BlockState
Gets the BlockState that this entity is currently inside.

Returns: The block state that this entity is currently inside

script.zs
// Player.inBlockState() as BlockState;
myPlayer.inBlockState();

Return Type: BlockState

increaseScore(score as int)
Increases the score of the player.
script.zs
// Player.increaseScore(score as int);
myPlayer.increaseScore(myInt);

Parameters:

score Type: int - The score to increase.
Getter
Gets the inventory of the player.
script.zs
// Player.inventory as Inventory
myPlayer.inventory

Return Type: Inventory

inventory() as Inventory
Gets the inventory of the player.

Returns: The inventory of the player.

script.zs
// Player.inventory() as Inventory;
myPlayer.inventory();

Return Type: Inventory

Getter
Checks if the entity is affected by potions, entities such as armor stands are not affected by potions.
script.zs
// Player.isAffectedByPotions as bool
myPlayer.isAffectedByPotions

Return Type: bool

isAffectedByPotions() as bool
Checks if the entity is affected by potions, entities such as armor stands are not affected by potions.

Returns: True if the entity is affected by potions, false otherwise.

script.zs
// Player.isAffectedByPotions() as bool;
myPlayer.isAffectedByPotions();

Return Type: bool

Getter
Checks if the entity is alive.
script.zs
// Player.isAlive as bool
myPlayer.isAlive

Return Type: bool

isAlive() as bool
Checks if the entity is alive.

Returns: true if the entity is alive.

script.zs
// Player.isAlive() as bool;
myPlayer.isAlive();

Return Type: bool

Getter
Checks if the entity is always ticking.
script.zs
// Player.isAlwaysTicking as bool
myPlayer.isAlwaysTicking

Return Type: bool

isAlwaysTicking() as bool
Checks if the entity is always ticking.

Returns: true if the entity is always ticking.

script.zs
// Player.isAlwaysTicking() as bool;
myPlayer.isAlwaysTicking();

Return Type: bool

Getter
Checks if the entity is attackable.
script.zs
// Player.isAttackable as bool
myPlayer.isAttackable

Return Type: bool

isAttackable() as bool
Checks if the entity is attackable.

Returns: true if the entity is attackable.

script.zs
// Player.isAttackable() as bool;
myPlayer.isAttackable();

Return Type: bool

Getter
Checks if this entity is performing an auto spin attack.
script.zs
// Player.isAutoSpinAttack as bool
myPlayer.isAutoSpinAttack

Return Type: bool

isAutoSpinAttack() as bool
Checks if this entity is performing an auto spin attack.

Returns: True if the entity is performing an auto spin attack, false otherwise.

script.zs
// Player.isAutoSpinAttack() as bool;
myPlayer.isAutoSpinAttack();

Return Type: bool

Getter
Checks if this entity is a baby.
script.zs
// Player.isBaby as bool
myPlayer.isBaby

Return Type: bool

isBaby() as bool
Checks if this entity is a baby.

Returns: True if the entity is a baby, false otherwise.

script.zs
// Player.isBaby() as bool;
myPlayer.isBaby();

Return Type: bool

Getter
Checks if the entity is blocking.
script.zs
// Player.isBlocking as bool
myPlayer.isBlocking

Return Type: bool

isBlocking() as bool
Checks if the entity is blocking.

Returns: True if the entity is blocking, false otherwise.

script.zs
// Player.isBlocking() as bool;
myPlayer.isBlocking();

Return Type: bool

isColliding(pos as BlockPos, state as BlockState) as bool
Checks if this entity is colliding with the given BlockState at the given BlockPos.

Returns: true if the entity is colliding with the block.

script.zs
// Player.isColliding(pos as BlockPos, state as BlockState) as bool;
myPlayer.isColliding(myBlockPos, myBlockState);

Parameters:

pos Type: BlockPos - The position of the block to check.
state Type: BlockState - The state of the block to check.

Return Type: bool

Getter
Checks if the player is creative.
script.zs
// Player.isCreative as bool
myPlayer.isCreative

Return Type: bool

isCreative() as bool
Checks if the player is creative.

Returns: Whether the player is creative.

script.zs
// Player.isCreative() as bool;
myPlayer.isCreative();

Return Type: bool

Getter
Checks if the entity is crouching.
script.zs
// Player.isCrouching as bool
myPlayer.isCrouching

Return Type: bool

isCrouching() as bool
Checks if the entity is crouching.

Returns: true if the entity is crouching.

script.zs
// Player.isCrouching() as bool;
myPlayer.isCrouching();

Return Type: bool

Getter
Checks if the entity is currently glowing.
script.zs
// Player.isCurrentlyGlowing as bool
myPlayer.isCurrentlyGlowing

Return Type: bool

Getter
Checks if the entity is currently glowing.
script.zs
// Player.isCurrentlyGlowing as bool
myPlayer.isCurrentlyGlowing

Return Type: bool

isCurrentlyGlowing() as bool
Checks if the entity is currently glowing.

Returns: True if the entity is currently glowing, false otherwise.

script.zs
// Player.isCurrentlyGlowing() as bool;
myPlayer.isCurrentlyGlowing();

Return Type: bool

isCurrentlyGlowing() as bool
Checks if the entity is currently glowing.

Returns: true if the entity is currently glowing.

script.zs
// Player.isCurrentlyGlowing() as bool;
myPlayer.isCurrentlyGlowing();

Return Type: bool

Getter
Checks if the custom name of the entity is visible.
script.zs
// Player.isCustomNameVisible as bool
myPlayer.isCustomNameVisible

Return Type: bool

isCustomNameVisible() as bool
Checks if the custom name of the entity is visible.

Returns: true if the custom name is visible.

script.zs
// Player.isCustomNameVisible() as bool;
myPlayer.isCustomNameVisible();

Return Type: bool

isDamageSourceBlocked(source as DamageSource) as bool
Determines whether the entity can block the damage source based on the damage source's location, whether the damage source is blockable, and whether the entity is blocking.

Returns: True if the entity can block the damage source, false otherwise.

script.zs
// Player.isDamageSourceBlocked(source as DamageSource) as bool;
myPlayer.isDamageSourceBlocked(myDamageSource);

Parameters:

source Type: DamageSource - The damage source to check.

Return Type: bool

Getter
Checks if this entity is dead or dying.
script.zs
// Player.isDeadOrDying as bool
myPlayer.isDeadOrDying

Return Type: bool

isDeadOrDying() as bool
Checks if this entity is dead or dying.

Returns: True if this entity is dead or dying, false otherwise.

script.zs
// Player.isDeadOrDying() as bool;
myPlayer.isDeadOrDying();

Return Type: bool

Getter
Checks if the entity is descending.
script.zs
// Player.isDescending as bool
myPlayer.isDescending

Return Type: bool

isDescending() as bool
Checks if the entity is descending.

Returns: true if the entity is descending.

script.zs
// Player.isDescending() as bool;
myPlayer.isDescending();

Return Type: bool

Getter
Checks if the entity is being discrete.
script.zs
// Player.isDiscrete as bool
myPlayer.isDiscrete

Return Type: bool

isDiscrete() as bool
Checks if the entity is being discrete.

Returns: true if the entity is being discrete.

script.zs
// Player.isDiscrete() as bool;
myPlayer.isDiscrete();

Return Type: bool

Getter
Checks if this player is a fake player, mainly used for machines.
script.zs
// Player.isFakePlayer as bool
myPlayer.isFakePlayer

Return Type: bool

Getter
Checks if the entity is flying with an elytra.
script.zs
// Player.isFallFlying as bool
myPlayer.isFallFlying

Return Type: bool

isFallFlying() as bool
Checks if the entity is flying with an elytra.

Returns: True if the entity is flying with an elytra, false otherwise.

script.zs
// Player.isFallFlying() as bool;
myPlayer.isFallFlying();

Return Type: bool

isFree(x as double, y as double, z as double) as bool
Checks if the offset position from the entity's current position has a collision with a block or a liquid.

Returns: true if the entity is free to move in the given position.

script.zs
// Player.isFree(x as double, y as double, z as double) as bool;
myPlayer.isFree(myDouble, myDouble, myDouble);

Parameters:

x Type: double - The x position to check.
y Type: double - The y position to check.
z Type: double - The z position to check.

Return Type: bool

Getter
Checks if the entity is fully frozen.
script.zs
// Player.isFullyFrozen as bool
myPlayer.isFullyFrozen

Return Type: bool

isFullyFrozen() as bool
Checks if the entity is fully frozen.

Returns: true if the entity is fully frozen.

script.zs
// Player.isFullyFrozen() as bool;
myPlayer.isFullyFrozen();

Return Type: bool

isHolding(item as Item) as bool
Checks if the entity is holding an item in their hand.

Returns: True if the entity is holding the item, false otherwise.

script.zs
// Player.isHolding(item as ItemDefinition) as bool;
myPlayer.isHolding(myItem);

Parameters:

item Type: ItemDefinition - The item to check.

Return Type: bool

isHolding(predicate as function(t as ItemStack) as bool) as bool
Checks if the entity is holding an item in their hand.

Returns: True if the entity is holding the item, false otherwise.

script.zs
// Player.isHolding(predicate as function(t as ItemStack) as bool) as bool;
myPlayer.isHolding(myPredicate);

Parameters:

predicate Type: function(t as ItemStack) as bool - The predicate to check.

Return Type: bool

Getter
Checks if the player is hurt.
script.zs
// Player.isHurt as bool
myPlayer.isHurt

Return Type: bool

isHurt() as bool
Checks if the player is hurt.

Returns: Whether the player is hurt.

script.zs
// Player.isHurt() as bool;
myPlayer.isHurt();

Return Type: bool

Getter
Checks if the entity is in lava.
script.zs
// Player.isInLava as bool
myPlayer.isInLava

Return Type: bool

isInLava() as bool
Checks if the entity is in lava.

Returns: true if the entity is in lava.

script.zs
// Player.isInLava() as bool;
myPlayer.isInLava();

Return Type: bool

Getter
Checks if this entity is inverted for heal and harm. This usually happens for undead mobs where potions of healing with harm them.
script.zs
// Player.isInvertedHealAndHarm as bool
myPlayer.isInvertedHealAndHarm

Return Type: bool

isInvertedHealAndHarm() as bool
Checks if this entity is inverted for heal and harm. This usually happens for undead mobs where potions of healing with harm them.

Returns: True if this entity is inverted for heal and harm, false otherwise.

script.zs
// Player.isInvertedHealAndHarm() as bool;
myPlayer.isInvertedHealAndHarm();

Return Type: bool

Getter
Checks if the entity is invisible.
script.zs
// Player.isInvisible as bool
myPlayer.isInvisible

Return Type: bool

isInvisible() as bool
Checks if the entity is invisible.

Returns: true if the entity is invisible.

script.zs
// Player.isInvisible() as bool;
myPlayer.isInvisible();

Return Type: bool

isInvisibleTo(player as Player) as bool
Checks if the entity is invisible to the given Player.

Returns: true if the entity is invisible to the player.

script.zs
// Player.isInvisibleTo(player as Player) as bool;
myPlayer.isInvisibleTo(myPlayer);

Parameters:

player Type: Player - The player to check.

Return Type: bool

Getter
Checks if the entity is invulnerable.
script.zs
// Player.isInvulnerable as bool
myPlayer.isInvulnerable

Return Type: bool

isInvulnerable() as bool
Checks if the entity is invulnerable.

Returns: true if the entity is invulnerable.

script.zs
// Player.isInvulnerable() as bool;
myPlayer.isInvulnerable();

Return Type: bool

isInvulnerableTo(source as DamageSource) as bool
Checks if the entity is invulnerable to the given DamageSource.

Returns: true if the entity is invulnerable to the damage source.

script.zs
// Player.isInvulnerableTo(source as DamageSource) as bool;
myPlayer.isInvulnerableTo(myDamageSource);

Parameters:

source Type: DamageSource - The damage source to check.

Return Type: bool

Getter
Checks if the entity is in a wall.
script.zs
// Player.isInWall as bool
myPlayer.isInWall

Return Type: bool

isInWall() as bool
Checks if the entity is in a wall.

Returns: true if the entity is in a wall.

script.zs
// Player.isInWall() as bool;
myPlayer.isInWall();

Return Type: bool

Getter
Checks if the entity is in water.
script.zs
// Player.isInWater as bool
myPlayer.isInWater

Return Type: bool

isInWater() as bool
Checks if the entity is in water.

Returns: true if the entity is in water.

script.zs
// Player.isInWater() as bool;
myPlayer.isInWater();

Return Type: bool

Getter
Checks if the entity is in water or a bubble column.
script.zs
// Player.isInWaterOrBubble as bool
myPlayer.isInWaterOrBubble

Return Type: bool

isInWaterOrBubble() as bool
Checks if the entity is in water or a bubble column.

Returns: true if the entity is in water or a bubble column.

script.zs
// Player.isInWaterOrBubble() as bool;
myPlayer.isInWaterOrBubble();

Return Type: bool

Getter
Checks if the entity is in water or rain.
script.zs
// Player.isInWaterOrRain as bool
myPlayer.isInWaterOrRain

Return Type: bool

isInWaterOrRain() as bool
Checks if the entity is in water or rain.

Returns: true if the entity is in water or rain.

script.zs
// Player.isInWaterOrRain() as bool;
myPlayer.isInWaterOrRain();

Return Type: bool

Getter
Checks if the entity is in water or rain or a bubble column.
script.zs
// Player.isInWaterRainOrBubble as bool
myPlayer.isInWaterRainOrBubble

Return Type: bool

isInWaterRainOrBubble() as bool
Checks if the entity is in water or rain or a bubble column.

Returns: true if the entity is in water or rain or a bubble column.

script.zs
// Player.isInWaterRainOrBubble() as bool;
myPlayer.isInWaterRainOrBubble();

Return Type: bool

Getter
Checks if the player is the local player.
script.zs
// Player.isLocalPlayer as bool
myPlayer.isLocalPlayer

Return Type: bool

isLocalPlayer() as bool
Checks if the player is the local player.

Returns: Whether the player is the local player.

script.zs
// Player.isLocalPlayer() as bool;
myPlayer.isLocalPlayer();

Return Type: bool

Getter
Checks if the entity has no gravity.
script.zs
// Player.isNoGravity as bool
myPlayer.isNoGravity

Return Type: bool

isNoGravity() as bool
Checks if the entity has no gravity.

Returns: true if the entity has no gravity.

script.zs
// Player.isNoGravity() as bool;
myPlayer.isNoGravity();

Return Type: bool

Getter
Checks if the entity is on fire.
script.zs
// Player.isOnFire as bool
myPlayer.isOnFire

Return Type: bool

isOnFire() as bool
Checks if the entity is on fire.

Returns: true if the entity is on fire.

script.zs
// Player.isOnFire() as bool;
myPlayer.isOnFire();

Return Type: bool

Getter
Checks if the entity is on portal cooldown.
script.zs
// Player.isOnPortalCooldown as bool
myPlayer.isOnPortalCooldown

Return Type: bool

isOnPortalCooldown() as bool
Checks if the entity is on portal cooldown.

Returns: true if the entity is on portal cooldown.

script.zs
// Player.isOnPortalCooldown() as bool;
myPlayer.isOnPortalCooldown();

Return Type: bool

Getter
Checks if the entity is a passenger.
script.zs
// Player.isPassenger as bool
myPlayer.isPassenger

Return Type: bool

isPassenger() as bool
Checks if the entity is a passenger.

Returns: true if the entity is a passenger.

script.zs
// Player.isPassenger() as bool;
myPlayer.isPassenger();

Return Type: bool

isPassengerOfSameVehicle(entity as Entity) as bool
Checks if the entity is a passenger of the same vehicle.

Returns: true if the entity is a passenger of the same vehicle.

script.zs
// Player.isPassengerOfSameVehicle(entity as Entity) as bool;
myPlayer.isPassengerOfSameVehicle(myEntity);

Parameters:

entity Type: Entity - The entity to check.

Return Type: bool

Getter
Checks if the entity is pickable.
script.zs
// Player.isPickable as bool
myPlayer.isPickable

Return Type: bool

isPickable() as bool
Checks if the entity is pickable.

Returns: true if the entity is pickable.

script.zs
// Player.isPickable() as bool;
myPlayer.isPickable();

Return Type: bool

Getter
Checks if the entity is pushable.
script.zs
// Player.isPushable as bool
myPlayer.isPushable

Return Type: bool

isPushable() as bool
Checks if the entity is pushable.

Returns: true if the entity is pushable.

script.zs
// Player.isPushable() as bool;
myPlayer.isPushable();

Return Type: bool

Getter
Checks if the entity is pushed by fluid.
script.zs
// Player.isPushedByFluid as bool
myPlayer.isPushedByFluid

Return Type: bool

isPushedByFluid() as bool
Checks if the entity is pushed by fluid.

Returns: true if the entity is pushed by fluid.

script.zs
// Player.isPushedByFluid() as bool;
myPlayer.isPushedByFluid();

Return Type: bool

Getter
Checks if the player has reduced debug info.
script.zs
// Player.isReducedDebugInfo as bool
myPlayer.isReducedDebugInfo

Return Type: bool

isReducedDebugInfo() as bool
Checks if the player has reduced debug info.

Returns: Whether the player has reduced debug info.

script.zs
// Player.isReducedDebugInfo() as bool;
myPlayer.isReducedDebugInfo();

Return Type: bool

Getter
Checks if the entity has been removed.
script.zs
// Player.isRemoved as bool
myPlayer.isRemoved

Return Type: bool

isRemoved() as bool
Checks if the entity has been removed.

Returns: Whether the entity has been removed.

script.zs
// Player.isRemoved() as bool;
myPlayer.isRemoved();

Return Type: bool

Getter
Checks if the player is scoping like when using a SpyGlass.
script.zs
// Player.isScoping as bool
myPlayer.isScoping

Return Type: bool

isScoping() as bool
Checks if the player is scoping like when using a SpyGlass.

Returns: Whether the player is scoping.

script.zs
// Player.isScoping() as bool;
myPlayer.isScoping();

Return Type: bool

Getter
Checks if the secondary use is active, this usually means that the player is sneaking.
script.zs
// Player.isSecondaryUseActive as bool
myPlayer.isSecondaryUseActive

Return Type: bool

isSecondaryUseActive() as bool
Checks if the secondary use is active, this usually means that the player is sneaking.

Returns: Whether the secondary use is active.

script.zs
// Player.isSecondaryUseActive() as bool;
myPlayer.isSecondaryUseActive();

Return Type: bool

Getter
Checks if this entity is sensitive to water, meaning that it will take damage from being in water.
script.zs
// Player.isSensitiveToWater as bool
myPlayer.isSensitiveToWater

Return Type: bool

isSensitiveToWater() as bool
Checks if this entity is sensitive to water, meaning that it will take damage from being in water.

Returns: True if the entity is sensitive to water, false otherwise.

script.zs
// Player.isSensitiveToWater() as bool;
myPlayer.isSensitiveToWater();

Return Type: bool

Getter
Checks if the shift key is down.
script.zs
// Player.isShiftKeyDown as bool
myPlayer.isShiftKeyDown

Return Type: bool

isShiftKeyDown() as bool
Checks if the shift key is down.

Returns: true if the shift key is down.

script.zs
// Player.isShiftKeyDown() as bool;
myPlayer.isShiftKeyDown();

Return Type: bool

Getter
Checks if the entity is silent, meaning it won't play any sounds.
script.zs
// Player.isSilent as bool
myPlayer.isSilent

Return Type: bool

isSilent() as bool
Checks if the entity is silent, meaning it won't play any sounds.

Returns: true if the entity is silent.

script.zs
// Player.isSilent() as bool;
myPlayer.isSilent();

Return Type: bool

Getter
Checks if the entity is sleeping.
script.zs
// Player.isSleeping as bool
myPlayer.isSleeping

Return Type: bool

isSleeping() as bool
Checks if the entity is sleeping.

Returns: True if the entity is sleeping, false otherwise.

script.zs
// Player.isSleeping() as bool;
myPlayer.isSleeping();

Return Type: bool

Getter
Checks if the player has been in bed long enough to trigger sleeping.
script.zs
// Player.isSleepingLongEnough as bool
myPlayer.isSleepingLongEnough

Return Type: bool

isSleepingLongEnough() as bool
Checks if the player has been in bed long enough to trigger sleeping.

Returns: Whether the player has been sleeping long enough.

script.zs
// Player.isSleepingLongEnough() as bool;
myPlayer.isSleepingLongEnough();

Return Type: bool

Getter
Checks if the entity is a spectator.
script.zs
// Player.isSpectator as bool
myPlayer.isSpectator

Return Type: bool

isSpectator() as bool
Checks if the entity is a spectator.

Returns: true if the entity is a spectator.

script.zs
// Player.isSpectator() as bool;
myPlayer.isSpectator();

Return Type: bool

Getter
Checks if the entity is sprinting.
script.zs
// Player.isSprinting as bool
myPlayer.isSprinting

Return Type: bool

isSprinting() as bool
Checks if the entity is sprinting.

Returns: true if the entity is sprinting.

script.zs
// Player.isSprinting() as bool;
myPlayer.isSprinting();

Return Type: bool

Getter
Checks if the entity is stepping carefully.
script.zs
// Player.isSteppingCarefully as bool
myPlayer.isSteppingCarefully

Return Type: bool

isSteppingCarefully() as bool
Checks if the entity is stepping carefully.

Returns: true if the entity is stepping carefully.

script.zs
// Player.isSteppingCarefully() as bool;
myPlayer.isSteppingCarefully();

Return Type: bool

Getter
Checks if the entity is suppressing bounce.
script.zs
// Player.isSuppressingBounce as bool
myPlayer.isSuppressingBounce

Return Type: bool

isSuppressingBounce() as bool
Checks if the entity is suppressing bounce.

Returns: true if the entity is suppressing bounce.

script.zs
// Player.isSuppressingBounce() as bool;
myPlayer.isSuppressingBounce();

Return Type: bool

Getter
Checks if the entity is suppressing sliding down a ladder, such as sneaking while on a ladder.
script.zs
// Player.isSuppressingSlidingDownLadder as bool
myPlayer.isSuppressingSlidingDownLadder

Return Type: bool

isSuppressingSlidingDownLadder() as bool
Checks if the entity is suppressing sliding down a ladder, such as sneaking while on a ladder.

Returns: True if the entity is suppressing sliding down a ladder, false otherwise.

script.zs
// Player.isSuppressingSlidingDownLadder() as bool;
myPlayer.isSuppressingSlidingDownLadder();

Return Type: bool

Getter
Checks if the entity is swimming.
script.zs
// Player.isSwimming as bool
myPlayer.isSwimming

Return Type: bool

isSwimming() as bool
Checks if the entity is swimming.

Returns: true if the entity is swimming.

script.zs
// Player.isSwimming() as bool;
myPlayer.isSwimming();

Return Type: bool

Getter
Checks if the entity is underwater.
script.zs
// Player.isUnderWater as bool
myPlayer.isUnderWater

Return Type: bool

isUnderWater() as bool
Checks if the entity is underwater.

Returns: true if the entity is underwater.

script.zs
// Player.isUnderWater() as bool;
myPlayer.isUnderWater();

Return Type: bool

Getter
Checks if this entity is using an item.
script.zs
// Player.isUsingItem as bool
myPlayer.isUsingItem

Return Type: bool

isUsingItem() as bool
Checks if this entity is using an item.

Returns: True if the entity is using an item, false otherwise.

script.zs
// Player.isUsingItem() as bool;
myPlayer.isUsingItem();

Return Type: bool

Getter
Checks if the entity is a vehicle.
script.zs
// Player.isVehicle as bool
myPlayer.isVehicle

Return Type: bool

isVehicle() as bool
Checks if the entity is a vehicle.

Returns: true if the entity is a vehicle.

script.zs
// Player.isVehicle() as bool;
myPlayer.isVehicle();

Return Type: bool

Getter
Checks if the entity is visually crawling.
script.zs
// Player.isVisuallyCrawling as bool
myPlayer.isVisuallyCrawling

Return Type: bool

isVisuallyCrawling() as bool
Checks if the entity is visually crawling.

Returns: true if the entity is visually crawling.

script.zs
// Player.isVisuallyCrawling() as bool;
myPlayer.isVisuallyCrawling();

Return Type: bool

Getter
Checks if the entity is visually swimming.
script.zs
// Player.isVisuallySwimming as bool
myPlayer.isVisuallySwimming

Return Type: bool

Getter
Checks if the entity is visually swimming.
script.zs
// Player.isVisuallySwimming as bool
myPlayer.isVisuallySwimming

Return Type: bool

isVisuallySwimming() as bool
Checks if the entity is visually swimming.

Returns: True if the entity is visually swimming, false otherwise.

script.zs
// Player.isVisuallySwimming() as bool;
myPlayer.isVisuallySwimming();

Return Type: bool

isVisuallySwimming() as bool
Checks if the entity is visually swimming.

Returns: true if the entity is visually swimming.

script.zs
// Player.isVisuallySwimming() as bool;
myPlayer.isVisuallySwimming();

Return Type: bool

Getter
Gets the jump boost power for this entity.
script.zs
// Player.jumpBoostPower as double
myPlayer.jumpBoostPower

Return Type: double

jumpBoostPower() as double
Gets the jump boost power for this entity.

Returns: The jump boost power.

script.zs
// Player.jumpBoostPower() as double;
myPlayer.jumpBoostPower();

Return Type: double

jumpFromGround()
Makes the player jump from the ground.
script.zs
// Player.jumpFromGround();
myPlayer.jumpFromGround();
kill()
Kills the entity.
script.zs
// Player.kill();
myPlayer.kill();
Getter
Gets the kill credit for this entity. If this entity was last hit by a player, then it will be that player, otherwise it will be the last mob that hit this entity.
script.zs
// Player.killCredit as LivingEntity
myPlayer.killCredit

Return Type: LivingEntity

killCredit() as LivingEntity
Gets the kill credit for this entity. If this entity was last hit by a player, then it will be that player, otherwise it will be the last mob that hit this entity.

Returns: The kill credit.

script.zs
// Player.killCredit() as LivingEntity;
myPlayer.killCredit();

Return Type: LivingEntity

knockback(x as double, y as double, z as double)
Knocks back this entity.
script.zs
// Player.knockback(x as double, y as double, z as double);
myPlayer.knockback(myDouble, myDouble, myDouble);

Parameters:

x Type: double - The x coordinate to knock back to.
y Type: double - The y coordinate to knock back to.
z Type: double - The z coordinate to knock back to.
Getter
Gets the last climbable position for this entity.
script.zs
// Player.lastClimbablePos as BlockPos
myPlayer.lastClimbablePos

Return Type: BlockPos

lastClimbablePos() as BlockPos
Gets the last climbable position for this entity.

Returns: The last climbable position.

script.zs
// Player.lastClimbablePos() as BlockPos;
myPlayer.lastClimbablePos();

Return Type: BlockPos

Getter
Gets the last damage source for this entity.
script.zs
// Player.lastDamageSource as DamageSource
myPlayer.lastDamageSource

Return Type: DamageSource

lastDamageSource() as DamageSource
Gets the last damage source for this entity.

Returns: The last damage source.

script.zs
// Player.lastDamageSource() as DamageSource;
myPlayer.lastDamageSource();

Return Type: DamageSource

Getter
Gets the last entity that hurt this entity.
script.zs
// Player.lastHurtByMob as LivingEntity
myPlayer.lastHurtByMob

Return Type: LivingEntity

lastHurtByMob() as LivingEntity
Gets the last entity that hurt this entity.

Returns: The last entity that hurt this entity.

script.zs
// Player.lastHurtByMob() as LivingEntity;
myPlayer.lastHurtByMob();

Return Type: LivingEntity

Getter
Gets the timestamp when this entity was last hurt by a mob.
script.zs
// Player.lastHurtByMobTimestamp as int
myPlayer.lastHurtByMobTimestamp

Return Type: int

lastHurtByMobTimestamp() as int
Gets the timestamp when this entity was last hurt by a mob.

Returns: The timestamp when this entity was last hurt by a mob.

script.zs
// Player.lastHurtByMobTimestamp() as int;
myPlayer.lastHurtByMobTimestamp();

Return Type: int

Getter
Gets the last entity that this entity hurt.
script.zs
// Player.lastHurtMob as LivingEntity
myPlayer.lastHurtMob

Return Type: LivingEntity

lastHurtMob() as LivingEntity
Gets the last entity that this entity hurt.

Returns: The last entity that this entity hurt.

script.zs
// Player.lastHurtMob() as LivingEntity;
myPlayer.lastHurtMob();

Return Type: LivingEntity

Getter
Gets the timestamp when this entity last hurt a mob.
script.zs
// Player.lastHurtMobTimestamp as int
myPlayer.lastHurtMobTimestamp

Return Type: int

lastHurtMobTimestamp() as int
Gets the timestamp when this entity last hurt a mob.

Returns: The timestamp when this entity last hurt a mob.

script.zs
// Player.lastHurtMobTimestamp() as int;
myPlayer.lastHurtMobTimestamp();

Return Type: int

lavaHurt()
Causes the entity to take damage from lava.
script.zs
// Player.lavaHurt();
myPlayer.lavaHurt();
Getter
Gets the Level of the entity.
script.zs
// Player.level as Level
myPlayer.level

Return Type: Level

Getter
Gets the look angle of the entity.
script.zs
// Player.lookAngle as Vec3
myPlayer.lookAngle

Return Type: Vec3

lookAngle() as Vec3
Gets the look angle of the entity.

Returns: The look angle of the entity.

script.zs
// Player.lookAngle() as Vec3;
myPlayer.lookAngle();

Return Type: Vec3

Getter
Gets the loot table for this entity.
script.zs
// Player.lootTable as ResourceLocation
myPlayer.lootTable

Return Type: ResourceLocation

lootTable() as ResourceLocation
Gets the loot table for this entity.

Returns: The loot table.

script.zs
// Player.lootTable() as ResourceLocation;
myPlayer.lootTable();

Return Type: ResourceLocation

Getter
Gets the seed used when generating loot from this entity.
script.zs
// Player.lootTableSeed as long
myPlayer.lootTableSeed

Return Type: long

Getter
Gets the luck of the player.
script.zs
// Player.luck as float
myPlayer.luck

Return Type: float

luck() as float
Gets the luck of the player.

Returns: The luck of the player.

script.zs
// Player.luck() as float;
myPlayer.luck();

Return Type: float

magicCrit(entity as Entity)
Spawns magic critical hit particle at the hit entity.
script.zs
// Player.magicCrit(entity as Entity);
myPlayer.magicCrit(myEntity);

Parameters:

entity Type: Entity - The entity to hit.
Getter
Gets the main arm of the player.
script.zs
// Player.mainArm as HumanoidArm
myPlayer.mainArm

Return Type: HumanoidArm

mainArm() as HumanoidArm
Gets the main arm of the player.

Returns: The main arm of the player.

script.zs
// Player.mainArm() as HumanoidArm;
myPlayer.mainArm();

Return Type: HumanoidArm

Getter
Gets the main hand item for this entity.
script.zs
// Player.mainHandItem as ItemStack
myPlayer.mainHandItem

Return Type: ItemStack

mainHandItem() as ItemStack
Gets the main hand item for this entity.

Returns: The main hand item.

script.zs
// Player.mainHandItem() as ItemStack;
myPlayer.mainHandItem();

Return Type: ItemStack

Getter
Gets the maximum air supply of the entity.
script.zs
// Player.maxAirSupply as int
myPlayer.maxAirSupply

Return Type: int

maxAirSupply() as int
Gets the maximum air supply of the entity.

Returns: The maximum air supply of the entity.

script.zs
// Player.maxAirSupply() as int;
myPlayer.maxAirSupply();

Return Type: int

Getter
Gets the maximum fall distance of the entity.
script.zs
// Player.maxFallDistance as int
myPlayer.maxFallDistance

Return Type: int

maxFallDistance() as int
Gets the maximum fall distance of the entity.

Returns: The maximum fall distance of the entity.

script.zs
// Player.maxFallDistance() as int;
myPlayer.maxFallDistance();

Return Type: int

Getter
Gets the maximum health for this entity.
script.zs
// Player.maxHealth as float
myPlayer.maxHealth

Return Type: float

maxHealth() as float
Gets the maximum health for this entity.

Returns: The maximum health.

script.zs
// Player.maxHealth() as float;
myPlayer.maxHealth();

Return Type: float

Getter
Checks if the player may build.
script.zs
// Player.mayBuild as bool
myPlayer.mayBuild

Return Type: bool

mayBuild() as bool
Checks if the player may build.

Returns: Whether the player may build.

script.zs
// Player.mayBuild() as bool;
myPlayer.mayBuild();

Return Type: bool

Getter
Gets the motion direction of the entity.
script.zs
// Player.motionDirection as Direction
myPlayer.motionDirection

Return Type: Direction

motionDirection() as Direction
Gets the motion direction of the entity.

Returns: The motion direction of the entity.

script.zs
// Player.motionDirection() as Direction;
myPlayer.motionDirection();

Return Type: Direction

moveRelative(amount as float, relative as Vec3)
Moves the entity relative to its current position.
script.zs
// Player.moveRelative(amount as float, relative as Vec3);
myPlayer.moveRelative(myFloat, myVec3);

Parameters:

amount Type: float - The amount to move the entity by.
relative Type: Vec3 - The relative position to move the entity by.
moveTo(vec as Vec3)
Moves the entity to the given position.
script.zs
// Player.moveTo(vec as Vec3);
myPlayer.moveTo(myVec3);

Parameters:

vec Type: Vec3 - The position to move the entity to.
moveTo(x as double, y as double, z as double)
Moves the entity to the given position.
script.zs
// Player.moveTo(x as double, y as double, z as double);
myPlayer.moveTo(myDouble, myDouble, myDouble);

Parameters:

x Type: double - The x position to move the entity to.
y Type: double - The y position to move the entity to.
z Type: double - The z position to move the entity to.
moveTo(pos as BlockPos, yaw as float, pitch as float)
Moves the entity to the given position.
script.zs
// Player.moveTo(pos as BlockPos, yaw as float, pitch as float);
myPlayer.moveTo(myBlockPos, myFloat, myFloat);

Parameters:

pos Type: BlockPos - The position to move the entity to.
yaw Type: float - The yaw to move the entity to.
pitch Type: float - The pitch to move the entity to.
moveTo(x as double, y as double, z as double, yaw as float, pitch as float)
Moves the entity to the given position.
script.zs
// Player.moveTo(x as double, y as double, z as double, yaw as float, pitch as float);
myPlayer.moveTo(myDouble, myDouble, myDouble, myFloat, myFloat);

Parameters:

x Type: double - The x position to move the entity to.
y Type: double - The y position to move the entity to.
z Type: double - The z position to move the entity to.
yaw Type: float - The yaw to move the entity to.
pitch Type: float - The pitch to move the entity to.
Getter
Gets the name of the entity.
script.zs
// Player.name as Component
myPlayer.name

Return Type: Component

Getter
script.zs
// Player.name as Component
myPlayer.name

Return Type: Component

name() as Component
Gets the name of the entity.

Returns: The name of the entity.

script.zs
// Player.name() as Component;
myPlayer.name();

Return Type: Component

name() as Component
script.zs
// Player.name() as Component;
myPlayer.name();

Return Type: Component

Getter
Gets the time since this entity last performed an action.
script.zs
// Player.noActionTime as int
myPlayer.noActionTime

Return Type: int

noActionTime() as int
Gets the time since this entity last performed an action.

Returns: The time since this entity last performed an action.

script.zs
// Player.noActionTime() as int;
myPlayer.noActionTime();

Return Type: int

Getter
Gets the offhand item for this entity.
script.zs
// Player.offHandItem as ItemStack
myPlayer.offHandItem

Return Type: ItemStack

offHandItem() as ItemStack
Gets the offhand item for this entity.

Returns: The offhand item.

script.zs
// Player.offHandItem() as ItemStack;
myPlayer.offHandItem();

Return Type: ItemStack

Getter
Checks if the entity is on the ground.
script.zs
// Player.onGround as bool
myPlayer.onGround

Return Type: bool

Getter
Gets the position of the entity on the ground.
script.zs
// Player.onPos as BlockPos
myPlayer.onPos

Return Type: BlockPos

onPos() as BlockPos
Gets the position of the entity on the ground.

Returns: The position of the entity on the ground.

script.zs
// Player.onPos() as BlockPos;
myPlayer.onPos();

Return Type: BlockPos

Getter
Gets the passengers of the entity.
script.zs
// Player.passengers as List<Entity>
myPlayer.passengers

Return Type: List<Entity>

passengers() as List<Entity>
Gets the passengers of the entity.

Returns: The passengers of the entity.

script.zs
// Player.passengers() as List<Entity>;
myPlayer.passengers();

Return Type: List<Entity>

Getter
Gets the percent the entity is frozen.
script.zs
// Player.percentFrozen as float
myPlayer.percentFrozen

Return Type: float

percentFrozen() as float
Gets the percent the entity is frozen.

Returns: The percent the entity is frozen.

script.zs
// Player.percentFrozen() as float;
myPlayer.percentFrozen();

Return Type: float

Getter
Gets the piston push reaction of the entity.
script.zs
// Player.pistonPushReaction as PushReaction
myPlayer.pistonPushReaction

Return Type: PushReaction

pistonPushReaction() as PushReaction
Gets the piston push reaction of the entity.

Returns: The piston push reaction of the entity.

script.zs
// Player.pistonPushReaction() as PushReaction;
myPlayer.pistonPushReaction();

Return Type: PushReaction

playNotifySound(event as SoundEvent, source as SoundSource, volume as float, pitch as float)
Plays a sound for the player.
script.zs
// Player.playNotifySound(event as SoundEvent, source as SoundSource, volume as float, pitch as float);
myPlayer.playNotifySound(mySoundEvent, mySoundSource, myFloat, myFloat);

Parameters:

event Type: SoundEvent - The sound event to play.
source Type: SoundSource - The source of the sound.
volume Type: float - The volume of the sound.
pitch Type: float - The pitch of the sound.
playSound(sound as SoundEvent, volume as float, pitch as float)
Plays a sound at the entity's location.
script.zs
// Player.playSound(sound as SoundEvent, volume as float, pitch as float);
myPlayer.playSound(mySoundEvent, myFloat, myFloat);

Parameters:

sound Type: SoundEvent - The sound to play.
volume Type: float - The volume of the sound.
pitch Type: float - The pitch of the sound.
Getter
Gets the position of the entity.
script.zs
// Player.position as Vec3
myPlayer.position

Return Type: Vec3

position() as Vec3
Gets the position of the entity.

Returns: The position of the entity.

script.zs
// Player.position() as Vec3;
myPlayer.position();

Return Type: Vec3

positionRider(entity as Entity)
Positions the rider of the entity.
script.zs
// Player.positionRider(entity as Entity);
myPlayer.positionRider(myEntity);

Parameters:

entity Type: Entity - The entity to position the rider of.
Getter
Gets this entity's random source.
script.zs
// Player.random as RandomSource
myPlayer.random

Return Type: RandomSource

random() as RandomSource
Gets this entity's random source.

Returns: The random source for the entity.

script.zs
// Player.random() as RandomSource;
myPlayer.random();

Return Type: RandomSource

Getter
Gets the registry name of the entity.
script.zs
// Player.registryName as ResourceLocation
myPlayer.registryName

Return Type: ResourceLocation

registryName() as ResourceLocation
Gets the registry name of the entity.

Returns: The registry name of the entity.

script.zs
// Player.registryName() as ResourceLocation;
myPlayer.registryName();

Return Type: ResourceLocation

releaseUsingItem()
Releases the item that the entity is using.
script.zs
// Player.releaseUsingItem();
myPlayer.releaseUsingItem();
removeAllEffects() as bool
Removes all effects from this entity.

Returns: True if all effects were removed, false otherwise.

script.zs
// Player.removeAllEffects() as bool;
myPlayer.removeAllEffects();

Return Type: bool

removeEffect(effect as MobEffect) as bool
Removes an effect from this entity.

Returns: True if the effect was removed, false otherwise.

script.zs
// Player.removeEffect(effect as MobEffect) as bool;
myPlayer.removeEffect(myMobEffect);

Parameters:

effect Type: MobEffect - The effect to remove.

Return Type: bool

removeEffectNoUpdate(effect as MobEffect) as MobEffectInstance
Removes an effect from this entity without causing an update.

Returns: The removed effect.

script.zs
// Player.removeEffectNoUpdate(effect as MobEffect) as MobEffectInstance;
myPlayer.removeEffectNoUpdate(myMobEffect);

Parameters:

effect Type: MobEffect - The effect to remove.

Return Type: MobEffectInstance

removeTag(tagName as string) as bool
Removes a tag from the entity.

Returns: true if the tag was removed.

script.zs
// Player.removeTag(tagName as string) as bool;
myPlayer.removeTag(myString);

Parameters:

tagName Type: string - The name of the tag to remove.

Return Type: bool

removeVehicle()
Removes the vehicle of the entity.
script.zs
// Player.removeVehicle();
myPlayer.removeVehicle();
respawn()
Respawns the player.
script.zs
// Player.respawn();
myPlayer.respawn();
Getter
Gets the root vehicle of the entity.
script.zs
// Player.rootVehicle as Entity
myPlayer.rootVehicle

Return Type: Entity

rootVehicle() as Entity
Gets the root vehicle of the entity.

Returns: The root vehicle of the entity.

script.zs
// Player.rootVehicle() as Entity;
myPlayer.rootVehicle();

Return Type: Entity

Getter
Gets this entity's scale.
script.zs
// Player.scale as float
myPlayer.scale

Return Type: float

scale() as float
Gets this entity's scale.

Returns: The scale of the entity.

script.zs
// Player.scale() as float;
myPlayer.scale();

Return Type: float

Getter
Gets the score of the player.
script.zs
// Player.score as int
myPlayer.score

Return Type: int

score() as int
Gets the score of the player.

Returns: The score of the player.

script.zs
// Player.score() as int;
myPlayer.score();

Return Type: int

sendMessage(text as Component)
Sends a message to the player.
script.zs
// Player.sendMessage(text as Component);
myPlayer.sendMessage(myComponent);

Parameters:

text Type: Component - The message to send.
setAbsorptionAmount(absorption as float)
Sets the absorption amount for this entity.
script.zs
// Player.setAbsorptionAmount(absorption as float);
myPlayer.setAbsorptionAmount(myFloat);

Parameters:

absorption Type: float - The absorption amount to set.
setAirSupply(air as int)
Sets the air supply of the entity.
script.zs
// Player.setAirSupply(air as int);
myPlayer.setAirSupply(myInt);

Parameters:

air Type: int - The new air supply of the entity.
setArrowCount(count as int)
Sets how many arrows are currently in this entity.
script.zs
// Player.setArrowCount(count as int);
myPlayer.setArrowCount(myInt);

Parameters:

count Type: int - The number of arrows to set.
setAttachmentData(type as AttachmentType<T>, data as T) as T?
script.zs
// Player.setAttachmentData<T>(type as AttachmentType<T>, data as T) as T?;
myPlayer.setAttachmentData<T>(myAttachmentType, myT);

Parameters:

type Type: AttachmentType<T>
data Type: T

Return Type: T?

setAttachmentData(type as Supplier<AttachmentType<T>>, data as T) as T?
script.zs
// Player.setAttachmentData<T>(type as Supplier<AttachmentType<T>>, data as T) as T?;
myPlayer.setAttachmentData<T>(mySupplier, myT);

Parameters:

type Type: Supplier<AttachmentType<T>>
data Type: T

Return Type: T?

setCustomName(name as Component)
Sets the custom name of the entity.
script.zs
// Player.setCustomName(name as Component);
myPlayer.setCustomName(myComponent);

Parameters:

name Type: Component - The new custom name of the entity.
setCustomNameVisible(visible as bool)
Sets the custom name visible state of the entity.
script.zs
// Player.setCustomNameVisible(visible as bool);
myPlayer.setCustomNameVisible(myBool);

Parameters:

visible Type: bool - true if the custom name should be visible.
setDeltaMovement(xDelta as double, yDelta as double, zDelta as double)
Sets the delta movement of the entity.
script.zs
// Player.setDeltaMovement(xDelta as double, yDelta as double, zDelta as double);
myPlayer.setDeltaMovement(myDouble, myDouble, myDouble);

Parameters:

xDelta Type: double - The x delta movement to set.
yDelta Type: double - The y delta movement to set.
zDelta Type: double - The z delta movement to set.
setDiscardFriction(discardFriction as bool)
Sets if this entity should discard friction.
script.zs
// Player.setDiscardFriction(discardFriction as bool);
myPlayer.setDiscardFriction(myBool);

Parameters:

discardFriction Type: bool - True if this entity should discard friction, false otherwise.
setEntityOnShoulder(entityData as MapData) as bool
Sets an entity on the player's shoulder.

Returns: Whether the entity was set.

script.zs
// Player.setEntityOnShoulder(entityData as MapData) as bool;
myPlayer.setEntityOnShoulder(myMapData);

Parameters:

entityData Type: MapData - The entity data to set.

Return Type: bool

setGlowingTag(glowing as bool)
Makes the entity glow.
script.zs
// Player.setGlowingTag(glowing as bool);
myPlayer.setGlowingTag(myBool);

Parameters:

glowing Type: bool - true if the entity should be glowing.
setHealth(health as float)
Sets the health of this entity.
script.zs
// Player.setHealth(health as float);
myPlayer.setHealth(myFloat);

Parameters:

health Type: float - The health to set.
setInvisible(invisible as bool)
Sets the invisible state of the entity.
script.zs
// Player.setInvisible(invisible as bool);
myPlayer.setInvisible(myBool);

Parameters:

invisible Type: bool - true if the entity should be invisible.
setInvulnerable(invulnerable as bool)
Sets the invulnerable state of the entity.
script.zs
// Player.setInvulnerable(invulnerable as bool);
myPlayer.setInvulnerable(myBool);

Parameters:

invulnerable Type: bool - true if the entity should be invulnerable.
setIsInPowderSnow(inPowderSnow as bool)
Sets whether the entity is in powder snow.
script.zs
// Player.setIsInPowderSnow(inPowderSnow as bool);
myPlayer.setIsInPowderSnow(myBool);

Parameters:

inPowderSnow Type: bool - Whether the entity is in powder snow.
setItemInHand(hand as InteractionHand, stack as ItemStack)
Sets the item in the entity's hand.
script.zs
// Player.setItemInHand(hand as InteractionHand, stack as ItemStack);
myPlayer.setItemInHand(myInteractionHand, myItemStack);

Parameters:

hand Type: InteractionHand - The hand to set the item in.
stack Type: ItemStack - The item to set.
setItemSlot(slot as EquipmentSlot, stack as ItemStack)
Sets the item in a specific equipment slot.
script.zs
// Player.setItemSlot(slot as EquipmentSlot, stack as ItemStack);
myPlayer.setItemSlot(myEquipmentSlot, myItemStack);

Parameters:

slot Type: EquipmentSlot - The equipment slot to set the item in.
stack Type: ItemStack - The item stack to set in the slot.
setJumping(jumping as bool)
Sets whether this entity is jumping.
script.zs
// Player.setJumping(jumping as bool);
myPlayer.setJumping(myBool);

Parameters:

jumping Type: bool - True if the entity should jump, false otherwise.
setLastHurtByMob(entity as LivingEntity)
Sets the last entity that hurt this entity.
script.zs
// Player.setLastHurtByMob(entity as LivingEntity);
myPlayer.setLastHurtByMob(myLivingEntity);

Parameters:

entity Type: LivingEntity - The entity that hurt this entity.
setLastHurtByPlayer(player as Player)
Sets the last entity that hurt this entity.
script.zs
// Player.setLastHurtByPlayer(player as Player);
myPlayer.setLastHurtByPlayer(myPlayer);

Parameters:

player Type: Player - The player that hurt this entity.
setLastHurtMob(entity as Entity)
Sets the last entity that this entity hurt.
script.zs
// Player.setLastHurtMob(entity as Entity);
myPlayer.setLastHurtMob(myEntity);

Parameters:

entity Type: Entity - The entity that this entity hurt.
setMainArm(arm as HumanoidArm)
Sets the main arm of the player.
script.zs
// Player.setMainArm(arm as HumanoidArm);
myPlayer.setMainArm(myHumanoidArm);

Parameters:

arm Type: HumanoidArm - The arm to set.
setNoActionTime(idleTime as int)
Sets the time since this entity last performed an action.
script.zs
// Player.setNoActionTime(idleTime as int);
myPlayer.setNoActionTime(myInt);

Parameters:

idleTime Type: int - The time since this entity last performed an action.
setNoGravity(noGravity as bool)
Sets if the entity has no gravity.
script.zs
// Player.setNoGravity(noGravity as bool);
myPlayer.setNoGravity(myBool);

Parameters:

noGravity Type: bool - The no gravity state to set the entity to.
setOldPosAndRot()
Sets the old position and rotation of the entity.
script.zs
// Player.setOldPosAndRot();
myPlayer.setOldPosAndRot();
setOnGround(onGround as bool)
Sets if the entity is on the ground.
script.zs
// Player.setOnGround(onGround as bool);
myPlayer.setOnGround(myBool);

Parameters:

onGround Type: bool - The on ground state to set the entity to.
setPortalCooldown()
Sets the portal cooldown of the entity.
script.zs
// Player.setPortalCooldown();
myPlayer.setPortalCooldown();
setPos(position as Vec3)
Sets the position of the entity.
script.zs
// Player.setPos(position as Vec3);
myPlayer.setPos(myVec3);

Parameters:

position Type: Vec3 - The position to set the entity to.
setPos(x as double, y as double, z as double)
Sets the position of the entity.
script.zs
// Player.setPos(x as double, y as double, z as double);
myPlayer.setPos(myDouble, myDouble, myDouble);

Parameters:

x Type: double - The x position to set the entity to.
y Type: double - The y position to set the entity to.
z Type: double - The z position to set the entity to.
setPosRaw(x as double, y as double, z as double)
Sets the position of the entity to the given coordinates.
script.zs
// Player.setPosRaw(x as double, y as double, z as double);
myPlayer.setPosRaw(myDouble, myDouble, myDouble);

Parameters:

x Type: double - The x coordinate to set the position to.
y Type: double - The y coordinate to set the position to.
z Type: double - The z coordinate to set the position to.
setReducedDebugInfo(reducedDebugInfo as bool)
Sets if the player has reduced debug info.
script.zs
// Player.setReducedDebugInfo(reducedDebugInfo as bool);
myPlayer.setReducedDebugInfo(myBool);

Parameters:

reducedDebugInfo Type: bool - Whether the player has reduced debug info.
setRemoved(var1 as RemovalReason)
Removes this entity with the given removal reason.
script.zs
// Player.setRemoved(var1 as RemovalReason);
myPlayer.setRemoved(myRemovalReason);

Parameters:

var1 Type: RemovalReason - The removal reason to set.
setScore(score as int)
Sets the score of the player.
script.zs
// Player.setScore(score as int);
myPlayer.setScore(myInt);

Parameters:

score Type: int - The score to set.
setShiftKeyDown(keyDown as bool)
Sets the shift key down state of the entity.
script.zs
// Player.setShiftKeyDown(keyDown as bool);
myPlayer.setShiftKeyDown(myBool);

Parameters:

keyDown Type: bool - true if the shift key is down.
setSilent(silent as bool)
Sets if the entity is silent.
script.zs
// Player.setSilent(silent as bool);
myPlayer.setSilent(myBool);

Parameters:

silent Type: bool - The silent state to set the entity to.
setSleepingPos(pos as BlockPos)
Sets the position that the entity is sleeping at.
script.zs
// Player.setSleepingPos(pos as BlockPos);
myPlayer.setSleepingPos(myBlockPos);

Parameters:

pos Type: BlockPos - The position to set the entity to sleep at.
setSpeed(speed as float)
Sets the movement speed of this entity.
script.zs
// Player.setSpeed(speed as float);
myPlayer.setSpeed(myFloat);

Parameters:

speed Type: float - The movement speed to set.
setSprinting(sprinting as bool)
Sets the sprinting state of the entity.
script.zs
// Player.setSprinting(sprinting as bool);
myPlayer.setSprinting(myBool);

Parameters:

sprinting Type: bool - true if the entity should be sprinting.
setStingerCount(count as int)
Sets how many stingers are currently in this entity.
script.zs
// Player.setStingerCount(count as int);
myPlayer.setStingerCount(myInt);

Parameters:

count Type: int - The number of stingers to set.
setSwimming(swimming as bool)
Sets the swimming state of the entity.
script.zs
// Player.setSwimming(swimming as bool);
myPlayer.setSwimming(myBool);

Parameters:

swimming Type: bool - true if the entity should be swimming.
setTicksFrozen(ticks as int)
Sets the number of ticks the entity has been frozen.
script.zs
// Player.setTicksFrozen(ticks as int);
myPlayer.setTicksFrozen(myInt);

Parameters:

ticks Type: int - The new number of ticks the entity has been frozen.
Getter
Checks if the entity should be saved.
script.zs
// Player.shouldBeSaved as bool
myPlayer.shouldBeSaved

Return Type: bool

shouldBeSaved() as bool
Checks if the entity should be saved.

Returns: true if the entity should be saved.

script.zs
// Player.shouldBeSaved() as bool;
myPlayer.shouldBeSaved();

Return Type: bool

Getter
Checks if this entity should discard friction.
script.zs
// Player.shouldDiscardFriction as bool
myPlayer.shouldDiscardFriction

Return Type: bool

shouldDiscardFriction() as bool
Checks if this entity should discard friction.

Returns: True if this entity should discard friction, false otherwise.

script.zs
// Player.shouldDiscardFriction() as bool;
myPlayer.shouldDiscardFriction();

Return Type: bool

Getter
Gets the entity on the player's left shoulder.
script.zs
// Player.shoulderEntityLeft as MapData
myPlayer.shoulderEntityLeft

Return Type: MapData

shoulderEntityLeft() as MapData
Gets the entity on the player's left shoulder.

Returns: The entity on the player's left shoulder.

script.zs
// Player.shoulderEntityLeft() as MapData;
myPlayer.shoulderEntityLeft();

Return Type: MapData

Getter
Gets the entity on the player's right shoulder.
script.zs
// Player.shoulderEntityRight as MapData
myPlayer.shoulderEntityRight

Return Type: MapData

shoulderEntityRight() as MapData
Gets the entity on the player's right shoulder.

Returns: The entity on the player's right shoulder.

script.zs
// Player.shoulderEntityRight() as MapData;
myPlayer.shoulderEntityRight();

Return Type: MapData

Getter
Checks if the commands from this source should inform admins.
script.zs
// Player.shouldInformAdmins as bool
myPlayer.shouldInformAdmins

Return Type: bool

shouldInformAdmins() as bool
Checks if the commands from this source should inform admins.

Returns: True if the commands from this source should inform admins, false otherwise.

script.zs
// Player.shouldInformAdmins() as bool;
myPlayer.shouldInformAdmins();

Return Type: bool

Getter
Checks if the entity should show its name.
script.zs
// Player.shouldShowName as bool
myPlayer.shouldShowName

Return Type: bool

shouldShowName() as bool
Checks if the entity should show its name.

Returns: true if the entity should show its name.

script.zs
// Player.shouldShowName() as bool;
myPlayer.shouldShowName();

Return Type: bool

Getter
Checks if the entity should show vehicle health.
script.zs
// Player.showVehicleHealth as bool
myPlayer.showVehicleHealth

Return Type: bool

showVehicleHealth() as bool
Checks if the entity should show vehicle health.

Returns: true if the entity should show vehicle health.

script.zs
// Player.showVehicleHealth() as bool;
myPlayer.showVehicleHealth();

Return Type: bool

Getter
Gets the position that the entity is sleeping at.
script.zs
// Player.sleepingPos as BlockPos
myPlayer.sleepingPos

Return Type: BlockPos

sleepingPos() as BlockPos
Gets the position that the entity is sleeping at.

Returns: The position that the entity is sleeping at.

script.zs
// Player.sleepingPos() as BlockPos;
myPlayer.sleepingPos();

Return Type: BlockPos

Getter
Gets the sleep timer of the player.
script.zs
// Player.sleepTimer as int
myPlayer.sleepTimer

Return Type: int

sleepTimer() as int
Gets the sleep timer of the player.

Returns: The sleep timer of the player.

script.zs
// Player.sleepTimer() as int;
myPlayer.sleepTimer();

Return Type: int

Getter
Gets the SoundSource of the entity.
script.zs
// Player.soundSource as SoundSource
myPlayer.soundSource

Return Type: SoundSource

soundSource() as SoundSource
Gets the SoundSource of the entity.

Returns: The sound source of the entity.

script.zs
// Player.soundSource() as SoundSource;
myPlayer.soundSource();

Return Type: SoundSource

Getter
Gets the movement speed of this entity.
script.zs
// Player.speed as float
myPlayer.speed

Return Type: float

speed() as float
Gets the movement speed of this entity.

Returns: The movement speed of the entity.

script.zs
// Player.speed() as float;
myPlayer.speed();

Return Type: float

startRiding(entity as Entity) as bool
Starts riding the given entity.

Returns: true if the entity started riding.

script.zs
// Player.startRiding(entity as Entity) as bool;
myPlayer.startRiding(myEntity);

Parameters:

entity Type: Entity - The entity to start riding.

Return Type: bool

startRiding(entity as Entity, force as bool) as bool
Starts riding the given entity.

Returns: true if the entity started riding.

script.zs
// Player.startRiding(entity as Entity, force as bool) as bool;
myPlayer.startRiding(myEntity, myBool);

Parameters:

entity Type: Entity - The entity to start riding.
force Type: bool - true if the entity should be forced to start riding.

Return Type: bool

startSleeping(pos as BlockPos)
Starts the entity to sleep at a specific position.
script.zs
// Player.startSleeping(pos as BlockPos);
myPlayer.startSleeping(myBlockPos);

Parameters:

pos Type: BlockPos - The position to set the entity to sleep at.
startUsingItem(hand as InteractionHand)
Starts using an item.
script.zs
// Player.startUsingItem(hand as InteractionHand);
myPlayer.startUsingItem(myInteractionHand);

Parameters:

hand Type: InteractionHand - The hand to use the item with.
Getter
Gets how many stingers are currently in this entity.
script.zs
// Player.stingerCount as int
myPlayer.stingerCount

Return Type: int

stingerCount() as int
Gets how many stingers are currently in this entity.

Returns: The stinger count.

script.zs
// Player.stingerCount() as int;
myPlayer.stingerCount();

Return Type: int

stopRiding()
Stops riding the entity.
script.zs
// Player.stopRiding();
myPlayer.stopRiding();
stopSleeping()
Wakes up the player if they are sleeping
script.zs
// Player.stopSleeping();
myPlayer.stopSleeping();
stopUsingItem()
Stops using an item.
script.zs
// Player.stopUsingItem();
myPlayer.stopUsingItem();
Getter
Gets the UUID of the entity as a string.
script.zs
// Player.stringUUID as string
myPlayer.stringUUID

Return Type: string

stringUUID() as string
Gets the UUID of the entity as a string.

Returns: The UUID of the entity as a string.

script.zs
// Player.stringUUID() as string;
myPlayer.stringUUID();

Return Type: string

sweepAttack()
Spawns a sweep attack particle.
script.zs
// Player.sweepAttack();
myPlayer.sweepAttack();
swing(hand as InteractionHand)
Swings the entity's main hand.
script.zs
// Player.swing(hand as InteractionHand);
myPlayer.swing(myInteractionHand);

Parameters:

hand Type: InteractionHand - The hand to swing.
swing(hand as InteractionHand, updateSelf as bool)
Swings the entity's main hand.
script.zs
// Player.swing(hand as InteractionHand, updateSelf as bool);
myPlayer.swing(myInteractionHand, myBool);

Parameters:

hand Type: InteractionHand - The hand to swing.
updateSelf Type: bool - Whether to update the entity's self.
Getter
Gets the tags of the entity.
These tags are arbitrary strings that can be attached to an entity. A single entity is limited to 1024.
script.zs
// Player.tags as Set<string>
myPlayer.tags

Return Type: Set<string>

tags() as Set<string>
Gets the tags of the entity.
These tags are arbitrary strings that can be attached to an entity. A single entity is limited to 1024.

Returns: The tags of the entity.

script.zs
// Player.tags() as Set<string>;
myPlayer.tags();

Return Type: Set<string>

Getter
Gets the team color of the entity.
script.zs
// Player.teamColor as int
myPlayer.teamColor

Return Type: int

teamColor() as int
Gets the team color of the entity.

Returns: The team color of the entity.

script.zs
// Player.teamColor() as int;
myPlayer.teamColor();

Return Type: int

teleportTo(x as double, y as double, z as double)
Teleports the entity to the given position.
script.zs
// Player.teleportTo(x as double, y as double, z as double);
myPlayer.teleportTo(myDouble, myDouble, myDouble);

Parameters:

x Type: double - The x coordinate to teleport to.
y Type: double - The y coordinate to teleport to.
z Type: double - The z coordinate to teleport to.
Getter
Gets the number of ticks the entity has been frozen.
script.zs
// Player.ticksFrozen as int
myPlayer.ticksFrozen

Return Type: int

ticksFrozen() as int
Gets the number of ticks the entity has been frozen.

Returns: The number of ticks the entity has been frozen.

script.zs
// Player.ticksFrozen() as int;
myPlayer.ticksFrozen();

Return Type: int

Getter
Gets the number of ticks required to freeze the entity.
script.zs
// Player.ticksRequiredToFreeze as int
myPlayer.ticksRequiredToFreeze

Return Type: int

ticksRequiredToFreeze() as int
Gets the number of ticks required to freeze the entity.

Returns: The number of ticks required to freeze the entity.

script.zs
// Player.ticksRequiredToFreeze() as int;
myPlayer.ticksRequiredToFreeze();

Return Type: int

Getter
Gets how long the entity has been using an item.
script.zs
// Player.ticksUsingItem as int
myPlayer.ticksUsingItem

Return Type: int

ticksUsingItem() as int
Gets how long the entity has been using an item.

Returns: The ticks that the entity has been using an item.

script.zs
// Player.ticksUsingItem() as int;
myPlayer.ticksUsingItem();

Return Type: int

travel(vec as Vec3)
Moves this entity towards the given location.
script.zs
// Player.travel(vec as Vec3);
myPlayer.travel(myVec3);

Parameters:

vec Type: Vec3 - The direction to move in.
turn(yaw as double, pitch as double)
Turns the entity.
script.zs
// Player.turn(yaw as double, pitch as double);
myPlayer.turn(myDouble, myDouble);

Parameters:

yaw Type: double - The yaw to turn the entity to.
pitch Type: double - The pitch to turn the entity to.
Getter
Gets the EntityType of the entity.
script.zs
// Player.type as EntityType<Entity>
myPlayer.type

Return Type: EntityType<Entity>

type() as EntityType<Entity>
Gets the EntityType of the entity.

Returns: The EntityType of the entity.

script.zs
// Player.type() as EntityType<Entity>;
myPlayer.type();

Return Type: EntityType<Entity>

unRide()
Removes any passengers and stops riding the current entity.
script.zs
// Player.unRide();
myPlayer.unRide();
updateCustomData(data as MapData)
Updates the custom NBT data for this Entity.
script.zs
// Player.updateCustomData(data as MapData);
myPlayer.updateCustomData({custom: "data"});

Parameters:

data Type: MapData - The custom data to store.
updateCustomEntityTag(level as Level, player as Player, data as MapData)
script.zs
// Player.updateCustomEntityTag(level as Level, player as Player, data as MapData);
myPlayer.updateCustomEntityTag(myLevel, myPlayer, myMapData);

Parameters:

level Type: Level
player Type: Player
data Type: MapData
updateData(data as MapData)
Updates the NBT data of this Entity.
script.zs
// Player.updateData(data as MapData);
myPlayer.updateData({key: "value"});

Parameters:

data Type: MapData - The new Data for this Entity
Getter
Gets the hand that the entity is using an item with.
script.zs
// Player.usedItemHand as InteractionHand
myPlayer.usedItemHand

Return Type: InteractionHand

usedItemHand() as InteractionHand
Gets the hand that the entity is using an item with.

Returns: The hand that the entity is using an item with.

script.zs
// Player.usedItemHand() as InteractionHand;
myPlayer.usedItemHand();

Return Type: InteractionHand

Getter
Gets the item that the entity is using.
script.zs
// Player.useItem as ItemStack
myPlayer.useItem

Return Type: ItemStack

useItem() as ItemStack
Gets the item that the entity is using.

Returns: The item that the entity is using.

script.zs
// Player.useItem() as ItemStack;
myPlayer.useItem();

Return Type: ItemStack

Getter
Gets the remaining ticks left of the use duration of the item that is being used.
script.zs
// Player.useItemRemainingTicks as int
myPlayer.useItemRemainingTicks

Return Type: int

useItemRemainingTicks() as int
Gets the remaining ticks left of the use duration of the item that is being used.

Returns: The remaining ticks for the item that the entity is using.

script.zs
// Player.useItemRemainingTicks() as int;
myPlayer.useItemRemainingTicks();

Return Type: int

Getter
Gets the UUID of the entity.
script.zs
// Player.uuid as UUID
myPlayer.uuid

Return Type: UUID

uuid() as UUID
Gets the UUID of the entity.

Returns: The UUID of the entity.

script.zs
// Player.uuid() as UUID;
myPlayer.uuid();

Return Type: UUID

Getter
Gets the vehicle of the entity.
script.zs
// Player.vehicle as Entity
myPlayer.vehicle

Return Type: Entity

vehicle() as Entity
Gets the vehicle of the entity.

Returns: The vehicle of the entity.

script.zs
// Player.vehicle() as Entity;
myPlayer.vehicle();

Return Type: Entity

Getter
Gets the voice pitch for this entity.
script.zs
// Player.voicePitch as float
myPlayer.voicePitch

Return Type: float

voicePitch() as float
Gets the voice pitch for this entity.

Returns: The voice pitch.

script.zs
// Player.voicePitch() as float;
myPlayer.voicePitch();

Return Type: float

Getter
Gets the x coordinate of the entity.
script.zs
// Player.x as double
myPlayer.x

Return Type: double

x() as double
Gets the x coordinate of the entity.

Returns: The x coordinate of the entity.

script.zs
// Player.x() as double;
myPlayer.x();

Return Type: double

Getter
Gets the amount of experience needed to reach the next level.
script.zs
// Player.xpNeededForNextLevel as int
myPlayer.xpNeededForNextLevel

Return Type: int

xpNeededForNextLevel() as int
Gets the amount of experience needed to reach the next level.

Returns: The amount of experience needed to reach the next level.

script.zs
// Player.xpNeededForNextLevel() as int;
myPlayer.xpNeededForNextLevel();

Return Type: int

Getter
Gets the y coordinate of the entity.
script.zs
// Player.y as double
myPlayer.y

Return Type: double

y() as double
Gets the y coordinate of the entity.

Returns: The y coordinate of the entity.

script.zs
// Player.y() as double;
myPlayer.y();

Return Type: double

Getter
Gets the z coordinate of the entity.
script.zs
// Player.z as double
myPlayer.z

Return Type: double

z() as double
Gets the z coordinate of the entity.

Returns: The z coordinate of the entity.

script.zs
// Player.z() as double;
myPlayer.z();

Return Type: double