Command (Expression) — Skript
Addon: Skript · Category: Expression · Since: 2.0, 2.7 (support for script commands)
Syntax
[the] (full|complete|whole) commandDescription
The command that caused an 'on command' event (excluding the leading slash and all arguments)
Examples
# prevent any commands except for the /exit command during some game
on command:
if {game::%player%::playing} is true:
if the command is not "exit":
message "You're not allowed to use commands during the game"
cancel the event