Name | Execute |
Syntax | execute [as_player/as_op/as_npc/as_server] [<Bukkit-command>] (silent) |
Short Description | Executes an arbitrary server command as if the player, NPC, or server typed it in. |
Full Description | Allows the execution of server commands through a Denizen script.
Commands can be executed as the server, as an npc, as an opped player, or as a player, as though it was typed by the respective source. Note that you should generally avoid using 'as_op', which is only meant for very specific special cases. 'as_server' is usually a better option. Note: do not include the slash at the start. A slash at the start will be interpreted equivalent to typing two slashes at the front in-game. Note that this is a Denizen script command that executes Bukkit commands. This can be considered the inverse of '/ex' (a Bukkit command that executes Denizen script commands). The 'silent' option can be specified with 'as_server' to hide the output. Note that 'silent' might or might not work with different plugins depending on how they operate. It can also be used with 'as_player' or 'as_op' to use network interception to silence the command output to player chat. Generally, you should never use this to execute a vanilla command, there is almost always a script command that should be used instead. Usually the 'execute' command should be reserved for interacting with external plugins. |
Related Tags | <entry[saveName].output> returns the output to an as_server sender.
|
Usage Example |
|
Usage Example |
|
Group | server |
Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/server/ExecuteCommand.java#L36 |