Readonly BetaafterReadonly BetabeforeContains a set of events that are applicable to the entirety of the world. Event callbacks are called immediately. Event callbacks are executed in read-only mode.
Readonly BetascoreboardBetaA method that is internal-only, used for broadcasting specific messages between client and server.
This function can't be called in read-only mode.
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.
OptionalmusicOptions: MusicOptionsPlays a particular music track for all players.
This function can't be called in read-only mode.
OptionalmusicOptions: 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.
Beta
A class that wraps the state of a world - a set of dimensions and the environment of Minecraft.