Skip to main content

onCommand

This event is triggered when a player sends a command.

caution

It's recommended to use the built-in command system instead of relying on this event, unless you are confident in what you're doing.

Parameters

NameTypeDescription
commandstringThe command, excluding the slash

Example

engine.events.on('onCommand', command => {
console.log(`command`, command);
});

Available on: Client