# RunCommand

TIP

  • runCommand(<sender>, <command>, [run_as_op])
  • Runs a command either as a player or as console.
  • To run the command in Console, you'll need to set <sender> as 'CONSOLE' with all capital letters.
  • If the sender is a player and you wanted the player to run the command as if they have OP, set [run_as_op] to TRUE, the default value is FALSE.

# Parameters

  • <sender> The command sender as string
  • <command> The command to run without the slash ( / ) as string
  • [run_as_op] Run the command as if the sender is an operator or not as bool

# Example

1: $command$ = 'say Hello World!'
2: runCommand($player$, $command$, $true$)