The dimension the player will spawn in.
The raknet connection of the player.
Optional
properties: Partial<PlayerProperties>The additional properties of the player.
Readonly
abilitiesThe current abilities of the player, and whether they are enabled
Readonly
attributesThe attributes that are attached to the entity These values are derived from the components and traits of the entity
The target block that the player is currently breaking.
Readonly
clientThe player's device information.
Readonly
connectionThe current raknet connection of the player
The current dimension of the entity.
This should not be dynamically changed, but instead use the teleport
method.
Readonly
dynamicThe components that are attached to the entity
The target entity that the player is currently looking at.
Readonly
flagsThe flags that are attached to the entity These values are derived from the components and traits of the entity
Readonly
identifierThe identifier of the entity.
Readonly
inputThe input info of the entity
Whether the entity is alive or not.
Whether the entity is falling or not.
Whether the entity is moving or not.
Whether the entity is currently ticking or not. If true, this means the behaviors of the entity are being processed. If false, this means the entity currently isn't within the simulation distance from a player.
The target item that the player is currently using.
Readonly
metadataThe metadata that is attached to the entity These values are derived from the components and traits of the entity
Whether the entity is on the ground or not.
Readonly
onThe screen display for the player. This is used to hide and show elements on the player's screen. This is also used to send title and subtitle messages to the player.
The container that the player is currently viewing.
The pending forms of the player
Readonly
permissionsThe permission level of the player.
Readonly
positionThe current position of the entity
Readonly
rotationThe current rotation of the entity
Readonly
runtimeThe current runtime id of the entity. (Incremented each time an entity is created)
The scoreboard identity of the entity.
Protected
Readonly
serenityThe serenity instance of the server
Readonly
sharedThe shared properties that are attached to the entity.
These properites are shared to the client to be used in resource pack elements.
They can also be queried via the molang
engine for use in resource packs.
Readonly
skinThe skin of the player
Readonly
tagsThe tags that are attached to the entity
Readonly
traitsThe traits that are attached to the player
Readonly
typeThe type of the entity.
Readonly
uniqueThe unique id of the entity. (Generated by the server, and exists for the lifetime of the entity)
Readonly
usernameThe username of the player
Readonly
uuidThe uuid of the player
Readonly
velocityThe current velocity of the entity
Readonly
xuidThe xbox user id of the player
Static
runtimeThe running total of entities that have been created
Whether the entity name tag is always visible.
Whether the entity name tag is always visible.
The gamemode of the player.
The gamemode of the player.
Whether the player has operator permissions.
Whether the player has operator permissions.
Whether the entity is sneaking or not.
Whether the entity is sprinting or not.
Whether the entity is swimming or not.
The name tag of the entity.
The name tag of the entity
The scale of the entity.
The scale of the entity.
The variant index of the entity.
The variant index of the entity.
The current world the entity is in.
Adds a component to the entity.
The key of the component.
The value of the component.
Add's an effect to the entity.
The effect type that will be applied to the entity
The duration of the effect in seconds.
Optional
options: EntityEffectOptionsAdds motion to the entity.
The motion to add.
Add a permission to the player.
The permission to add.
Adds a tag to the entity.
The tag to add.
Whether or not the tag was added.
Adds a trait to the entity.
The trait to add to the entity.
Optional
options: ConstructorParameters<T>[1]The additional options to pass to the trait.
The trait instance that was added to the entity.
Applies an impulse to the entity.
The impulse to apply.
Changes the dimension of the player.
The dimension to change the player to.
Clears the motion of the entity.
Despawns the entity from the dimension.
Optional
options: Partial<EntityDespawnOptions>Disconnect the player from the server
The reason for the disconnection
Optional
code: DisconnectReasonThe disconnect reason code
Optional
hideDisconnectScreen: falseWhether to hide the disconnect screen
Forces the entity to drop an item from its inventory.
The slot to drop the item from.
The amount of items to drop.
The container to drop the item from.
Whether or not the item was dropped.
Executes a command as the entity.
The command to execute.
The response of the command.
Executes a command in the dimension asynchronously.
The command to execute.
The response of the command.
Gets the cardinal direction of the entity.
The cardinal direction of the entity.
Get a container from the player.
The name of the container to get.
Optional
dynamicId: numberGets the specified component from the entity.
The key of the component.
The component if it exists, otherwise null.
Computes the entity's head location
Gets the item the entity is currently holding.
The item the entity is holding
Gets the selected inventory slot of the entity.
The selected hotbar index of the entity.
Get the shared property of the entity that is shared with the client.
The identifier of the property.
The value of the property.
Get the spawn point of the player.
The spawn point of the player.
Gets the tags of the entity.
The tags of the entity.
Gets the specified trait from the entity.
The trait to get from the entity
The trait if it exists, otherwise null
Gets the specified trait from the entity.
The trait to get from the entity
The trait if it exists, otherwise null
Computes the view direction vector based on the current pitch and yaw rotations.
A Vector3f representing the direction the view is pointing.
Whether the entity has the specified component.
The key of the component.
Whether the entity has the component or not.
Checks whether the entity has the effect or not.
The effect type to check if the entity has.
whether the entity has the effect or not.
Check if the player has a specific permission.
The permission to check.
True if the player has the permission, false otherwise.
Whether or not the entity has a tag.
The tag to check.
Whether or not the entity has the tag.
Whether the entity has the specified trait.
The trait to check for
Whether the entity has the trait
Causes a player to interact with the entity.
The player that is interacting with the entity.
The method that the player used to interact with the entity.
Checks if the entity is an item.
Whether or not the entity is an item.
Kills the entity.
Optional
options: Partial<EntityDeathOptions>The options for the entity death.
Load the player from the provided player entry
The world the player data is coming from
The player entry to load
Whether to overwrite the current player data; default is true
Plays a sound that player can only hear.
The name of the sound to play.
Optional
options: PlaySoundOptionsThe options for playing the sound.
Removes the specified component from the entity.
The key of the component.
Removes an effect from the entity.
The effect type to remove from the entity
Remove a permission from the player.
The permission to remove.
Removes a tag from the entity.
The tag to remove.
Whether or not the tag was removed.
Removes the specified trait from the entity.
The trait to remove
Send packets to the player (Normal Priority)
The packets to send to the player
Send packets to the player (Immediate Priority)
The packets to send to the player
Sends a message to the player
The message that will be sent.
Sets the component of the entity.
The key of the component.
The value of the component.
Set the motion of the player.
Optional
vector: Vector3fThe motion vector to set.
Sets and sends the entity head rotation
The new entity's head rotation
Sets the shared property of the entity that is shared with the client.
The identifier of the property.
The value of the property.
Set the spawn point of the player.
The position to set the spawn point to.
Shows the player profile of another player.
Optional
xuid: string | PlayerThe xuid of the player to show the profile of; default is this player.
Spawn the player in the dimension
Optional
options: Partial<EntitySpawnOptions>Starts an item cooldown for a specific category.
The category of the item cooldown.
The duration of the cooldown in ticks.
Stops a sound that is currently playing.
Optional
sound: stringThe name of the sound to stop; default is all sounds.
Teleports the player to a specific position.
The position to teleport the player to.
Optional
dimension: DimensionThe dimension to teleport the player to.
Transfers the player to a different server.
The address to transfer the player to.
The port to transfer the player to.
If the world should be reloaded.
Static
createCreates a new unique id for the entity.
The network id of the entity type
The current runtime id of the entity
A generated unique id for the entity
Create a new player instance within a dimension.