For the complete documentation index, see llms.txt. This page is also available as Markdown.

Console Delegate

Console Delegate allows the console to initiate prompts for a target player and execute the final completed command as the console.

This is the only secure way to prompt a player and execute the resulting command with console privileges.

Why is this needed?

Executing commands as the console directly from a player-initiated prompt is a major security risk, as players could manipulate inputs to run unauthorized commands. Console Delegate solves this by delegating only the input gathering to the player, while the console retains control and executes the final command.


Syntax & Usage

/consoledelegate <target> <command...>
  • <target>: The player who will receive and answer the prompts.

  • <command...>: The command (including prompts) to be executed by the console. Use %target_player% to reference the target player's name in the command.

  • This command must be executed by the console. If run by a player (even OP), it will not process.

  • Tab-completion for /consoledelegate requires the promptpaper.consoledelegate permission.


Examples

Basic Example

/consoledelegate CyR1en gamemode <what gamemode> %target_player%
  1. CyR1en is prompted: what gamemode

  2. CyR1en enters: creative

  3. Console executes: /gamemode creative CyR1en

With Post Command

  1. Console executes the main command as above.

  2. Console then executes the post command: /broadcast Gamemode changed to creative for CyR1en

Post commands attached to a console delegate session are executed by the player by default, unless explicitly marked with @console.

Last updated

Was this helpful?