ReadonlydimensionReadonlyidReadonlylocationReadonlynameReadonlytypeReturns the current location of the head component of this entity.
This function can't be called in read-only mode.
Returns the current velocity vector of the entity.
This function can't be called in read-only mode.
Returns the current view direction of the entity.
This function can't be called in read-only mode.
Command to run. Note that command strings should not start with slash.
For commands that return data, returns a JSON structure with command response values.
Runs a particular command asynchronously from the context of this entity. Note that there is a maximum queue of 128 asynchronous commands that can be run in a given tick.
This function can't be called in read-only mode.
The message to be displayed.
This method can throw if the provided RawMessage is
in an invalid format. For example, if an empty name string
is provided to score.
// Displays "Apple or Coal"
let rawMessage = {
translate: "accessibility.list.or.two",
with: { rawtext: [{ translate: "item.apple.name" }, { translate: "item.coal.name" }] },
};
player.sendMessage(rawMessage);
Represents a player within the world.