CommandPrompter
GitHubSpigotDiscordKofi
  • Welcome
  • Getting Started
    • Installation
    • Usage
    • Arguments
      • Prompt Argument
      • PromptQueue Argument
      • Prompt and PromptQueue Arguments
    • Commands and Permissions
  • Configuration
    • CommandPrompter Configuration
      • Prompt-Prefix
      • Prompt-Timeout
      • Cancel-Keyword
      • Enable-Permission
      • Update-Checker
      • Argument-Regex
      • Debug-Mode
      • Enable-Unsafe and Modification-Delay
      • Show-Completed-Command
      • Fancy-Logger
      • Ignored-Commands
      • Permission-Attachment
      • Command-Tab-Complete
      • Allowed-Commands-In-Prompt
      • Ignore MiniMessage
    • Prompts Configuration
      • Chat Prompt
        • Clickable-Cancel
        • Cancel-Message
        • Cancel-Hover-Message
        • Response-Listener-Priority
      • Player UI
        • Skull-Name-Format
        • Skull Custom Model Data
        • Size
        • Cache-Size
        • Cache-Delay
        • PlayerUI Control Items
        • Sorted
        • Per-World
        • Empty-Message
        • Filter-Format
      • Anvil UI
        • Enable-Title
        • Custom-Title
        • Prompt-Message
        • Item
        • Enchanted
      • Sign UI
        • Input-Field-Location
        • Material
    • Internationalization (I18N)
  • Prompts
    • Chat Prompt
    • Anvil UI Prompt
    • Player UI Prompt
    • Sign UI Prompt
  • Features
    • Permission Attachment
    • Input Validation
    • Post Command
    • Console Delegate
    • Player Delegate
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Configuration
  2. CommandPrompter Configuration

Argument-Regex

The Argument-Regex option determines if a part of a command is a prompt.

Usage

You can configure the Argument-Regex by editing the "config.yml" file as follows:

# This will determine if
# a part of a command is
# a prompt.
# 
# ONLY CHANGE THE FIRST AND LAST
# I.E (.*?), {.*?}, or [.*?]
Argument-Regex: <.*?>

In this example, the argument regex is set to <.*?>. Therefore a command with prompts will look like the following:

/test <this is a prompt>

Explanation

The Argument-Regex allows you to define a pattern that identifies prompts within a command. By customizing this regex, you can specify how CommandPrompter recognizes and handles command arguments as prompts.

To allow for reserved regex tokens like () and [], CommandPrompter escapes the first and last character of this configuration.

Example

To modify the argument regex pattern, use the following configuration:

Argument-Regex: (.*?)

This will set the argument regex to (.*?) for identifying command prompts.

PreviousUpdate-CheckerNextDebug-Mode

Last updated 1 year ago

Was this helpful?