CommandExecuting
Gets called when the server is executing a command.
Start a script section
!-- OnEvent CommandExecuting
-- require $evIsAllowed *evSender $evCommandType $evCommandFound *evCommand &evArguments $evCommandName
# Add your instructions here
- Group: ServerEvents
- Cancellable: Yes
- Event data:
CommandExecutingEventArgs
Injected variables
| Variable | Type | Description |
|---|---|---|
$evIsAllowed | bool value | Whether the event is allowed to run. |
*evSender | reference to CommandSender object | The sender of the command. |
$evCommandType | CommandType enum value | The type of the command that is being executed. |
$evCommandFound | bool value | Whether the command was found. |
*evCommand | reference to ICommand object | The command that is being executed. Can be null if the command was not found. |
&evArguments | collection of text value | The arguments of the command. |
$evCommandName | text value | Gets the name or alias of the command that was executed. |