Skip to content

@minecraft/server


@minecraft/server / ScriptEventCommandMessageAfterEvent

Class: ScriptEventCommandMessageAfterEvent ​

Defined in: @minecraft/server/index.d.ts:19522

Returns additional data about a /scriptevent command invocation.

Properties ​

id ​

readonly id: string

Defined in: @minecraft/server/index.d.ts:19529

Remarks ​

Identifier of this ScriptEvent command message.


initiator? ​

readonly optional initiator?: Entity

Defined in: @minecraft/server/index.d.ts:19536

Remarks ​

If this command was initiated via an NPC, returns the entity that initiated the NPC dialogue.


message ​

readonly message: string

Defined in: @minecraft/server/index.d.ts:19543

Remarks ​

Optional additional data passed in with the script event command.


sourceBlock? ​

readonly optional sourceBlock?: Block

Defined in: @minecraft/server/index.d.ts:19550

Remarks ​

Source block if this command was triggered via a block (e.g., a commandblock.)


sourceEntity? ​

readonly optional sourceEntity?: Entity

Defined in: @minecraft/server/index.d.ts:19557

Remarks ​

Source entity if this command was triggered by an entity (e.g., a NPC).


sourceType ​

readonly sourceType: ScriptEventSource

Defined in: @minecraft/server/index.d.ts:19563

Remarks ​

Returns the type of source that fired this command.