Command Sender (Expression) — Skript

Addon: Skript · Category: Expression · Since: 2.0

Syntax

[the] [command['s]] (sender|executor)

Description

The player or the console who sent a command. Mostly useful in <a href='commands'>commands</a> and <a href='#command'>command events</a>. If the command sender is a command block, its location can be retrieved by using %block's location%

Examples

make the command sender execute "/say hi!"
on command:
	log "%executor% used command /%command% %arguments%" to "commands.log"

View source