Class: CustomCommandOrigin
Beta
关于命令来源的详细信息。
Details about the origins of the command.
Properties
initiator?
readonlyoptionalinitiator?:Entity
Beta
Remarks
如果此命令是通过 NPC 发起的,则返回发起 NPC 对话的实体。
If this command was initiated via an NPC, returns the entity that initiated the NPC dialogue.
sourceBlock?
readonlyoptionalsourceBlock?:Block
Beta
Remarks
如果此命令是通过方块(如命令方块)触发的,则为来源方块。
Source block if this command was triggered via a block (e.g., a commandblock.)
sourceEntity?
readonlyoptionalsourceEntity?:Entity
Beta
Remarks
如果此命令是由实体(如 NPC)触发的,则为来源实体。
Source entity if this command was triggered by an entity (e.g., a NPC).
sourceType
readonlysourceType:CustomCommandSource
Beta
Remarks
返回触发此命令的来源类型。
Returns the type of source that fired this command.
