Advanced operations for working with commands
4

Available Commands

  • Execute: Execute a command with a modified source or delay
  • Message: Send a formatted message to the source
  • Random: Inserts random numbers or strings into a command

Execute

Usage: /cmdcontrol execute [-delay] [-source] <command>
-> -delay (Duration): Delay of the execution (flag)
-> -source (Source): Source for the command (flag)
-> command (Command): Command to be executed
Aliases: execute, ex
Permission: cmdcontrol.command.execute.base
-> cmdcontrol.command.execute.delay: Execute with a delay
-> cmdcontrol.command.execute.other: Execute from another player
-> cmdcontrol.command.execute.console: Execute from console

Executes a command; generally with one or more modifications.

The delay is expected in duration format, such as 5m (5 minutes), 12s500ms (12.5 seconds), etc. Executions with delays are not stored externally, so if the server restarts the command will not be run.

The source may be defined as a player name or one of #console, #server, #me, or #self. Separate permissions are required to execute a command from another player or the console (see above). They source also have permission to run the command and will receive any related messages for the command.

Warning: The permission to execute commands from console should not be given lightly!

Examples

  • /cc ex -delay 1000 say hi: Executes say hi from this source after 1 second (1000ms)
  • /cc ex -source #console bc hey: Executes bc hey from console
  • /cc ex -source Simon_Flash me hello: Executes me hello from the source Simon_Flash

Message

Usage: /cmdcontrol message <source> <message>
-> source (Source): Source to send message to
-> message (Text): Message to be sent
Aliases: message, msg
Permission: cmdcontrol.command.message.base

Sends a un-prefixed (raw) message to the given source (see above). This is similar to Minecraft’s /tellraw command, but it uses a message with formatting codes instead of JSON.

Examples

  • /cc msg #console hiya &a:D: Sends the formatted hiya :D message to console
  • /cc msg Simon_Flash [GitHub](https://github.com/SimonFlash): Sends GitHub to Simon_Flash with a link.
  • /cc msg #self [command](/bc \o/): Sends command to yourself that executes /bc \o/ when clicked.

Random

Usage: /CmdControl random <command>
-> command (Command): Command to be executed
Aliases: random, rnd
Permission: cmdcontrol.command.random.base

Executes a command replacing instances of the form <@Random[range]> and <@Random{choices}> with a random selection. This command is intended to be used through something like a CmdBuilder script to create commands like /roll <number> so the user is not responsible for memorizing the format.

Examples

  • /cc rnd me rolled a <@Random[1,6]>: Runs /me rolled a <number> with a random number between 1 and 6.
  • /cc rnd give Simon_Flash apple <@Random[1,64]>: Gives Simon_Flash between 1 and 64 apples.
  • /cc rnd pokegive Simon_Flash <@Random{snivy,sandile,bidoof}>: Gives a snivy, sandile, or bidoof to Simon_Flash.

Category: Admin Tools

Published on Feb 1, 2018

views

stars

watchers

total downloads

Promoted Versions

Members