Minecraft Wiki

The Minecraft Wiki is no longer considered as official by Microsoft and therefore several changes are required to be made, including to the wiki's logo. Please read this announcement for more information.

READ MORE

Minecraft Wiki
Advertisement
Information icon.svg
This feature is exclusive to Bedrock Edition. 
event
Permission level
required

1

Restrictions

Cheat only

Used to trigger an event on an entity.

Syntax[]

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

Arguments[]

<target: target>: CommandSelector<Actor>

Must be a player name or a target selector.
Specifies the target(s) to execute an entity event.

eventName: 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[]

CommandTriggerBedrock Edition
anythe arguments are not specified correctly Failed
target: target fails to resolve to one or more mobs (named players must be online)
all selected entities don't have this specified events declared in the events section of the entity definition file
On successEvent is executed

Output[]

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

History[]

Bedrock Edition
1.16.100beta 1.16.100.57Added /event.
Advertisement