BetaA method that is internal-only, used for broadcasting specific messages between client and server.
This function can't be called in read-only mode.
BetaReturns the absolute time since the start of the world.
This function can't be called in read-only mode.
Returns an array of all active players within the world.
This function can't be called in read-only mode.
BetaReturns the default spawn position.
Returns the default spawn position within the world where players are spawned if they don't have a specific spawn position set.
This function can't be called in read-only mode.
BetaReturns the value for the property, or undefined if the property has not been set.
BetaThe id of the entity.
The requested entity object.
Optionaloptions: EntityQueryOptionsAdditional options that can be used to filter the set of players returned.
A player array.
Returns a set of players based on a set of conditions defined via the EntityQueryOptions set of filter criteria.
This function can't be called in read-only mode.
BetaBetaOptionalmusicOptions: MusicOptionsPlays a particular music track for all players.
This function can't be called in read-only mode.
BetaOptionalmusicOptions: MusicOptionsQueues an additional music track for players. If a track is not playing, a music track will play.
This function can't be called in read-only mode.
BetaThe 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" }] },
};
world.sendMessage(rawMessage);
BetaLocation within the overworld where a player will spawn.
Sets the default spawn location for players within the world. Note that players can override this with their own spawn position. Note also that the default spawn position must be in the overworld dimension.
This function can't be called in read-only mode.
BetaData value of the property to set.
BetaBeta
A class that wraps the state of a world - a set of dimensions and the environment of Minecraft.