Skip to content

Post Completion Command (PostCommand)

Ethan Bacurio edited this page Aug 19, 2023 · 2 revisions

This feature is only available on versions 2.2.0+

CommandPrompter now allows you to add a command to execute after all of the prompts have been completed called PostCommand

Format

A PostCommand is an assignable PromptQueueArgument with the key -exa , which stands for execute after, that tells the parser to add a command that the plugin is going to execute after all of the prompts have been completed.

Here is an example:

/sampleCommand <this is a text prompt> <-exa say hello world!>

This should execute the command /say hello world! after completion.

Placeholders

An additional feature is the ability to put placeholders if you want to use one of the answers from the prompts. The placeholder format is p:<index>. Since I'm using the index, the index of the first prompt will always be 0.

/sampleCommand <what do you want to say> <-exa say p:0>

let's say, I enter Hello World! on the text prompt, the command to execute at the end should be /say Hello World!

Clone this wiki locally