Skip to main content

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

VariableTypeDescription
$evIsAllowedbool valueWhether the event is allowed to run.
*evSenderreference to CommandSender objectThe sender of the command.
$evCommandTypeCommandType enum valueThe type of the command that is being executed.
$evCommandFoundbool valueWhether the command was found.
*evCommandreference to ICommand objectThe command that is being executed. Can be null if the command was not found.
&evArgumentscollection of text valueThe arguments of the command.
$evCommandNametext valueGets the name or alias of the command that was executed.