Skip to content

@minecraft/server


@minecraft/server / CustomCommandOrigin

Class: CustomCommandOrigin ​

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

Details about the origins of the command.

Properties ​

initiator? ​

readonly optional initiator?: Entity

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

Remarks ​

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


sourceBlock? ​

readonly optional sourceBlock?: Block

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

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:7071

Remarks ​

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


sourceType ​

readonly sourceType: CustomCommandSource

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

Remarks ​

Returns the type of source that fired this command.