Commands/event

From Minecraft Wiki
Jump to: navigation, search
Grass Block JE7 BE6.png
This page describes content that may be included in a future update to Bedrock Edition.
These features have appeared in Bedrock Edition development versions, but the full update containing these features has not been released for Bedrock Edition yet.
Information icon.svg
This feature is exclusive to Bedrock Edition.
event
Restrictions

Operator

First introduced

BE 1.16.100 (1.16.100.57)

Used to trigger an event on an entity.

Syntax[edit]

event entity <target: target> <eventName: string>

Arguments[edit]

<target: target>: CommandSelector<Actor>

Must be a player name or a target selector
Specifies the target(s) to execute an entity event. If not specified, defaults to the executor who executed the command.

eventName: string: basic_string

Must be either a single word (no spaces) or a quoted string.
Specifies the in-game event for the entity. Should be a spawn event (event name for entities in behavior pack).

Result[edit]

CommandTriggerBedrock Edition
anythe arguments are not specified correctly Failed
if target: target fails to resolve to one or more online entities (named players must be online)
On successEvent successfully executed

Output[edit]

CommandEditionSituationSuccess Count
anyBedrock EditionOn fail0
On successthe number of entities that successfully executed entity event

History[edit]

Upcoming Bedrock Edition
1.16.100beta 1.16.100.57Added /event.