A prompt can have multiple arguments (except for prompt arguments). This allows you to disable sanitation, enable input validation, and assign permission attachments, in a single prompt.
Here is the list of all arguments that you can use so far:
Anvil Prompt
a
Prompt
Changes the prompt to become an
PlayerUI Prompt
p
Prompt
Changes the prompt to become a
SignUI Prompt
s
Prompt
Changes the prompt to become a
Disable Sanitation
ds
Prompt
Disables input sanitation for a specific prompt
Input Validation
iv:<alias>
Prompt
Validate an input for a certain prompt.
Post Command
exa:<tick delay>
PromptQueue
Add a command to execute after completion.
Post Command on Cancel
exac:<tick delay>
PromptQueue
Add a command to execute after completion is cancelled.
PromptQueue Arguments are within the scope of the whole PromptQueue (how a command is represented in CommandPrompter). This type of argument can be placed on any of the prompts and is only needed to be placed once. If placed multiple times, CommandPrompter will still process the argument but will essentially be useless since the first appearance of the argument has already modified the whole PromptQueue.
Example:
The last prompt has an argument -exa
. This argument is called Post Command, which is essentially a command that will be called after the command is completed and dispatched. This is considered a prompt queue argument because it affects the whole prompt queue itself not just a single prompt.
CommandPrompter has two type of arguments, Prompt and PromptQueue arguments.
Prompt and PromptQueue arguments are special sets of characters starting with a -
and ending with a space that you put on a prompt to change how the prompt or the whole command behaves.
Prompt Arguments are only within the scope of a specific Prompt. Therefore, an argument will only modify how a specific prompt behaves.
Example:
For the command shown above, we can see that the first Prompt <Who do you want to change the nickname of?>
does not have any argument at all. However, the second prompt <-ds -a what nickname do you want?>
has two Prompt arguments: -ds
and -a
. These two arguments are considered as a Prompt Argument
since it will only modify the current prompt. -ds
disables the input sanitation for that current prompt only. Disabling input sanitation allows for the color codes to be kept since by default, CommandPrompter’s input processing removes them. The argument -a
changes that prompt to become an Anvil UI Prompt.