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

Presets

Presets are reusable prompt, post-command, approval-gate, and conditional post-command definitions stored in plugins/CommandPrompterPaper/presets.json.

Prompt preset

/command <@my_prompt>

The ID is case-sensitive and stops at the first space. Typing <@ in chat suggests configured preset IDs via tab completion. Inline flags appended inside a preset reference are ignored; configure behavior in JSON. Preset sanitize settings are honored ("sanitize": false preserves formatting and special characters in input).

Multi-input dialog presets produce N separate answers (one for each input row), while zero-input dialog presets produce 0 answers without consuming answer slots.

Create and manage prompt presets

Since 3.3.0, use /cmdp preset to turn an inline prompt into its corresponding structured JSON definition:

/cmdp preset add reason <Please enter a reason:>
/cmdp preset add rename <a:Enter a new name -ds>
/cmdp preset update reason <Why are you reporting this player?>
/cmdp preset remove rename

Use the saved prompt in another command, for example /report <p:Choose a player> <@reason> if your server provides /report.

Command
Behavior

/cmdp preset add <id> <inline prompt...>

Creates a prompt preset. The ID must be unused across all preset categories.

/cmdp preset update <id> <inline prompt...>

Replaces the complete definition of an existing prompt preset, including its type and options.

/cmdp preset remove <id>

Deletes an existing prompt preset. No inline prompt follows the ID.

Players and console can use these commands with promptpaper.preset, granted to operators by default and included in promptpaper.admin. TAB suggests the actions and existing prompt IDs for update and remove. /commandprompter preset is equivalent to /cmdp preset.

What gets saved

The trailing argument accepts exactly one complete inline prompt, including its delimiters. Spaces are part of that argument; do not wrap the whole prompt in quotes. Configured delimiters and screen mappings apply. A compound dialog is one prompt:

This creates a dialog preset with two entries in base.inputs: a choice row with constraints: ["set", "add"] and a number row with constraints: [0, 24, 2, 6]. Use it as <@adjustment>.

Conversion supports Chat, Anvil, Sign, Player UI, Dialog, Confirmation, and Item prompts, including configured aliases for those types. It preserves sanitization, title displays, supported execution options, and placeholders. Placeholders remain text until the preset is used. Dialog title/body rows become structured layout fields, and tab-completion dialogs retain their button threshold as dialog_type.max_buttons.

The resulting definition is saved in the prompts array of presets.json. You can edit its JSON fields for further customization; see Presets Configuration, including the shared behavior object for validators, answer types, timeouts, and early termination.

When changes take effect

Successful command edits are saved and become available immediately, without /cmdp reload. Active sessions retain the preset definitions they started with. After removing a preset, new commands referencing its ID fail until those references are changed or the preset is recreated.

Manual file edits still require /cmdp reload, which cancels active sessions. Preset commands reject edits while a configuration reload is in progress; retry when it finishes.

Rejected edits

The command reports an error for:

  • an existing ID passed to add, or a missing ID passed to update/remove;

  • an ID belonging to a post-command, approval gate, or conditional post-command;

  • plain text without prompt delimiters, multiple prompts, or surrounding command text;

  • a preset reference such as <@reason>, a post-command, or an approval gate as the input;

  • an unknown prompt type or validator alias, or a custom screen provider without a built-in JSON equivalent;

  • a compound prompt using a non-dialog type;

  • malformed presets.json, a preset count/file-size limit violation, or an unsuccessful save.

The command validates the complete candidate file before replacing it. Failed validation or saving keeps the active preset snapshot intact; unrelated entries and JSON fields are preserved by successful edits.

Post-command preset

The post-command's JSON execution_policy decides whether it runs on completion or cancellation. execute_as and delay_ticks also come from the preset; inline marker/delay hints do not override them.

Conditional post-commands use the same <!@id> reference. Their JSON condition selects if_true or if_false after the configured lifecycle event.

Approval-gate preset

An approval gate pauses after input collection and asks the target resolved by its trusted JSON definition. Decline or timeout prevents the primary command from running. See Command Flows.

Unknown prompt, post-command, conditional, or gate IDs abort interception and show a configuration error. Literal unknown tags are not passed through to the underlying command.

Run /cmdp reload after manually editing presets.json. Command edits through /cmdp preset apply immediately. See Presets Configuration for every field and full examples.

Last updated

Was this helpful?