Only this pageAll pages
Powered by GitBook
1 of 64

CommandPrompter

Loading...

Getting Started

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Configuration

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Prompts

Loading...

Loading...

Loading...

Loading...

Features

Loading...

Loading...

Loading...

Loading...

Loading...

CommandPrompter Configuration

Welcome to the configuration guide for CommandPrompter. The following sub-pages will help you understand the various configuration options available in the "config.yml" file.

config.yml doesn't allow you to configure prompts. However, you can configure prompt-config.yml. Please refer toto learn more

Prompts Configuration

Commands and Permissions

Commands

Command
Alias
Description
Permission

reload

r

Reloads command prompter.

commandprompter.reload

Permission
Description

commandprompter.rebuildheadcache

Allows a player to rebuild the head cache for Player UI.

commandprompter.consoledelegate

Permission just to hide the console delegate command from players.

commandprompter.playerdelegate

Permission just to hide the player delegate command from players.

cancel

c

Cancels command completion for command sender

commandprompter.cancel

rebuildheadcache

none

Command to rebuild Player UI's head cache.

commandprompter.rebuildheadcache

consoledelegate

none

Command for console delegate. This is not a CommandPrompter subcommand.

commandprompter.consoledelegate

playerdelegate

none

Command for player delegate. This is not a CommandPrompter subcommand

commandpromtper.consoledelegate

commandprompter.reload

Allows a player to reload CommandPrompter.

commandprompter.cancel

Allows a player to cancel their own command completion.

commandprompter.use

Allows a player to use CommandPrompter. (must be enabled)

All commands with the exception of consoledelegate are sub-commands of commandprompter (cmdp). Therefore if you want to reload your configuration, you would need to do /cmdp reload

Permissions

Permission Attachment

Permission attachments allow players to have temporary access to command permissions. It's only available via player delegate to prevent a vulnerability when it's used as a prompt queue argument.

The general idea is to give players a set of permissions that you define in a very short amount of time. This permission set and the duration can be found and configured in config.yml under the Permission Attachment section.

With the given configuration above, we defined a permission attachment called GAMEMODE to attach gamemode-related permission.

Step 2: Using permission attachments in a prompt

To use the permission attachment, we need to use it via the Player Delegate like the following:

Once the player fulfilled the prompt, CommandPrompter will attach the permissions defined under GAMEMODE and dispatch the command, and remove the attached permissions afterward.

Starting v2.7.0, this feature can only now be used through the Player Delegate command.

If you want to execute commands as a console refer to Console Delegate.

How to use Permission Attachment

Step 1: Configuring permissions

It's important that you only give permissions that you are willing to give to your players. I advise against putting permissions that allow your server to be compromised!

# Permission Attachment Config
# 
# Permission attachments allow players
# to have temporary permissions.
# 
# ticks - Set how long (in ticks) should the
#         permission attachment persist.
# 
# permissions - permissions to temporarily
#               attach to the players.
Permission-Attachment:
  ticks: 1
  Permissions:
    GAMEMODE:
    - bukkit.command.gamemode
    - essentials.gamemode
    - essentials.gamemode.survival
    - essentials.gamemode.creative
    
playerdelegate CyR1en GAMEMODE gamemode <what gamemode do you want?>

Welcome

Welcome to the official documentation for CommandPrompter! This documentation is designed to provide comprehensive guidance on configuring and utilizing the CommandPrompter plugin effectively.

About CommandPrompter

CommandPrompter is a powerful tool that enhances the command prompting experience in your Minecraft server. With its customizable configuration options, CommandPrompter allows you to tailor the command prompting process to suit your server's specific requirements.

Need Further Assistance?

If you encounter any issues or require additional assistance that isn't covered in this documentation, please don't hesitate to join our Discord server, where our friendly community is ready to help you out. Click the link below to join:

Join Our Discord Server

Further Documentation

If you can't find the information you're looking for in this GitBook, please check the CommandPrompter GitHub repository for additional resources and support.

We hope you find this documentation helpful in maximizing the potential of the CommandPrompter plugin for your Minecraft server!

Love using CommandPrompter? Support its growth and future development on Ko-fi, and be a part of shaping the next level of menu creation and command interactivity for your server! You will also get a special supporter role on the Discord server!

Installation

  • Download the latest version of CommandPrompter on

  • Drag and drop the downloaded .jar file into your server's plugins folder.

Internationalization (I18N)

The CommandPrompter.properties file contains key-value pairs for configuring various messages and prompts used within the CommandPrompter plugin. These messages cover a range of interactions, including prompts, command completions, error messages, and more. Below are some of the notable properties defined in the file:

  • PromptInProgress: Message displayed when a user is still in the process of completing a command, providing an option to cancel. The %s placeholder represents the command that can be typed to cancel the prompt.

Post Command

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

A PostCommand is an assignable PromptQueueArgument with the key -exa , which stands for execute after, which 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:

This should execute the command /say hello world!

SignPromptMultiArg: Message indicating a multi-argument sign prompt, instructing the user to type their response after a specific indicator.
  • SignPromptReminder: Message guiding users during a sign prompt, informing them that each line they input will be combined into a single response.

  • CompletedCommand: Message confirming the command that will be executed. The %s placeholder represents the actual command that will be executed.

  • PromptNoPerm: Message displayed when a user lacks the necessary permission to use CommandPrompter.

  • PromptPlayerOnly: Message indicating that CommandPrompter can only be used by players.

  • PromptCancel: Message notifying users when command completion is cancelled.

  • CommandCancelNotInCompletion: Error message indicating that the user is not in the command completion process.

  • DelegateInvalidArgs: Error message for invalid arguments in a console delegate command.

  • DelegateUsage: Usage message for a console delegate command. The %s placeholder represents the command's usage.

  • DelegateInvalidPlayer: Error message for a console delegate command when the specified player is not online. The %s placeholder represents the player's name.

  • DelegateConsoleOnly: Error message indicating that a command can only be executed by the console.

  • PluginVersion: Message displaying the installed version of the CommandPrompter plugin. The %s placeholder represents the version number.

  • PCMOutOfBounds: Error message for when an prompt index for a Post Command is out of bounds of the valid prompt answers.

  • These properties allow for easy customization of messages and prompts, tailoring the user experience within the CommandPrompter.

    This supports UTF-8 encoding

    Arguments

    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.

    Start the server and you're done!

    Installation

    SpigotMC

    For versions <2.6.0, is needed to use SignUI

    after completion.

    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.

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

    Another feature available starting from 2.3.0 is the ability to have more than one Post Command. Here's an example of this.

    The main command is /time set however, we have three post commands that also clear the weather and broadcast that the time and weather have been changed.

    You can add a tick delay for a post command by adding a :<ticks> after the exa

    With the example above, we ask which player to give the operator to. But after 100 ticks (5 seconds), we remove that operator status from that player.

    This is another useful feature when you want to execute a command when the player cancels the command completion. This gives you the ability to reopen another menu if the prompt is canceled.

    The example above will re-open the punish menu if the anvil prompt gets canceled.

    For instances where you need the post command to have a different command executor, you can do so by piping them to a different executor.

    Format:

    Example:

    With the example above, the console delegates the prompt to the target_player and once the command is done, target_player will say "I am now [gamemode]".

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

    Examples below are in the context of a player. If you're using Console Delegate, the commands will be sent as console, making some commands have the wrong arguments. Adjust your command arguments respectively.

    Format

    /sampleCommand <what do you want to say> <-exa say p:0>
    /time set <enter time to set> <-exa broadcast Time set to &cp:0> <-exa weather clear> <-exa broadcast Weather cleared!>
    /op <-p who do you want to op?> <-exa:100 deop p:0>
    /mute <-a who do you want to mute?> <-exac:20 punish>
    -exa(c):<delay>|p
    -exa(c):<delay>|c -> PCM as Console
    [console]consoledelegate %target_player% gamemode <what gamemode do you want> %target_player% <-exa|p say I am now p:0>

    Placeholders

    Multiple Post Command

    Delayed Post Command

    Post Command on completion cancel

    Piping Post Command to a different executor

    To prevent regular (non-op) players from abusing this system through chat, post command piping will only work if the command sender is the console; therefore, you have to use or .

    Support the Development

    Usage

    CommandPrompter intercepts all of the commands that are being executed by players. If one of the commands contains Prompt(s) (by default it is signified with a <>, but could be changed in the configuration.) CommandPrompter will then cancel that command and prompt the player with whatever that prompt was. When all prompts have been resolved, CommandPrompter will then allow the player to execute the full command.

    from v2.5.0, you can now also use the command to prompt target players

    Additional Prompt Option

    An additional argument that you append at the beginning of the prompt changes the type of that prompt. By default, a prompt without an argument is going to be a Text Prompt. However, if we append the argument -a (with a space), the prompt becomes an Anvil Prompt. To see all of the available prompt types, check out the Prompts group on the sidebar. To learn more about Arguments check Prompt and PromptQueue Arguments

    Example

    Text Prompt:
        Player: /command <prompt 1> <prompt 2>
        CommandPrompter: prompt 1
        Player: answer1
        CommandPrompter: prompt 2
        Player: answer2
    
    Now that the command completion is done, CommandPrompter will now execute the following command:
    /command answer1 answer2
    
    Anvil Prompt:
        Player: /command <-a prompt>
        CommandPrompter: opens anvil gui for player.
        Player: types "answer1" on the anvil.
     
    Now that the command completion is done, CommandPrompter will now execute the following command:
    /command answer1

    Argument-Regex

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

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

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

    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.

    PromptQueue Argument

    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 , 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.

    ProtocolLib
    PlayerDelegate
    ConsoleDelegate
    Console Delegate
    /ban <Who do you want to ban?> <What is the reason for the ban?> <-exa broadcast banned p:0>
    Post Command
    To modify the argument regex pattern, use the following configuration:

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

    Usage

    Explanation

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

    Example

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

    Prompt Argument

    Prompt Arguments are only within the scope of a specific Prompt. Therefore, an argument will only modify how a specific prompt behaves.

    Example:

    /nick <Who do you want to change the nickname of?> <-ds -a what nick name do you want?>

    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 to be kept since by default, CommandPrompter’s input processing removes them. The argument -a changes that prompt to become an .

    Prompt-Prefix

    The Prompt-Prefix option allows you to set a custom prefix for CommandPrompter's PluginMessenger.

    Usage

    You can configure the Prompt-Prefix by editing the "config.yml" file as follows:

    # Set the plugin prefix
    Prompt-Prefix: '[&3Prompter&r] '

    In this example, the prefix is set to [&3Prompter&r].

    Explanation

    The Prompt-Prefix is a string that appears before prompts when using the CommandPrompter plugin. It's customizable to match your server's branding or style.

    Example

    You can set the Prompt-Prefix to your server's name like this:

    This will display prompts with the prefix "[MyServer]".

    Prompt and PromptQueue Arguments

    Here is the list of all arguments that you can use so far:

    Argument Name
    Key
    Scope
    Description

    Prompt-Timeout

    The Prompt-Timeout option allows you to specify the duration, in seconds, until CommandPrompter cancels a prompt.

    You can configure the Prompt-Timeout by editing the "config.yml" file as follows:

    In this example, the timeout is set to 300 seconds.

    The Prompt-Timeout determines the period of inactivity after which CommandPrompter cancels a prompt. Adjust this value to control how long a user has to input a command before the prompt is canceled automatically.

    To set the Prompt-Timeout

    color codes
    Anvil UI Prompt
    Prompt-Prefix: '[&bMyServer&r] '
    to 120 seconds, use the following configuration:

    This will set the timeout to 120 seconds, allowing users two minutes to respond to a prompt.

    # After how many seconds until
    # CommandPrompter cancels a
    # prompt
    Prompt-Timeout: 300

    Usage

    Explanation

    Example

    Prompt-Timeout: 120

    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.

    Anvil Prompt

    a

    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.

    Prompt

    Enable-Permission

    The Enable-Permission option enables permission checks before a player can use the prompting feature.

    Usage

    You can configure the Enable-Permission by editing the "config.yml" file as follows:

    # Enable permission check
    # before a player can use
    # the prompting feature
    Enable-Permission: false

    In this example, the permission check is set to false.

    Explanation

    Enabling the Enable-Permission option allows you to control whether players need specific permissions to use the command prompting feature. When set to true, players must have the required permission to use the command prompting functionality.

    To enable permission checks, use the following configuration:

    This will enforce permission checks for using the command prompting feature.

    Update-Checker

    The Update-Checker option determines whether CommandPrompter can check if it's up to date.

    Usage

    You can configure the Update-Checker by editing the "config.yml" file as follows:

    # Allow CommandPrompter to
    # check if it's up to date.
    Update-Checker: true

    In this example, the update checker is enabled (true).

    Explanation

    Enabling the Update-Checker option allows CommandPrompter to automatically check whether there are any updates available. When set to true, CommandPrompter can perform version checks and provide notifications if a new version is available.

    To disable the update checker, use the following configuration:

    This will prevent CommandPrompter from checking for updates automatically.

    Console Delegate

    Console Delegate is the only way to prompt a player and execute the finalized command as the console.

    We can think of this feature as a new way to invoke the core part of CommandPrompter, the prompting feature. Instead of intercepting a command executed by a player, we can simply call the Console Delegate command, provide a target player, and the command you want that target player to fulfill.

    Motivation

    Due to how CommandPrompter works, we can't simply allow completed commands to be executed beyond the permission of the player who's calling that command. This is because CommandPrompter listens to player commands and if they have a PromptQueue argument that augments the whole PromptQueue to be dispatched as console, it leads to a very exploitable vulnerability. This essentially boils down to the fact that we cannot control what the player inputs as a command.

    However, with the new console delegate command, we can instead delegate the prompting to a target player . Once the command is completed, it's then sent back to the console to be executed as the console, not the player.

    The Console Delegate Command

    As I've mentioned before, this command can only be called from the console. However, there's still a permission (commandprompter.consoledelegate) associated with this command to make sure that it does not appear in the player's tab complete without that permission.

    Players with OP will be able to see the /consoledelegate command on their tab complete. However, CommandPrompter will not process the console delegate command if the sender instance is not ConsoleSender.

    Usage

    The console delegate command has the following format:

    consoledelegate <target_player> <command...>

    The last part of this argument is a greedy argument. Therefore, everything past the first argument which is the target player will be combined into one string and be considered as a command. This command will then be parsed and featuresdelegated to the target player to be completed.

    You can also use the placeholder %target_player% somewhere in your command to replace it with your actual target player.

    Here, we are using the default gamemode command and we're delegating the prompt to the player CyR1en. Let's say the player inputted creative, the completed command that will be executed by the console is:

    We can also take advantage of CommandPrompter's feature like PostCommand.

    The command above will be executed like the first example. However, we have a post command that executes the following command:

    Cancel-Keyword

    The Cancel-Keyword option determines the word that cancels command prompting.

    You can configure the Cancel-Keyword by editing the "config.yml" file as follows:

    In this example, the cancel keyword is set to "cancel".

    The Cancel-Keyword is the specific word that, when entered by a user, cancels the prompt queue. It provides users with a way to exit out of the prompt queue without executing any command.

    To change the cancel keyword to "exit", use the following configuration:

    Ignored-Commands

    The Ignored-Commands option allows you to specify a list of commands that CommandPrompter should ignore.

    You can configure the Ignored-Commands by editing the "config.yml" file as follows:

    In this example, the commands sampleCommand and sampleCommand2 are ignored by CommandPrompter.

    The Ignored-Commands option allows you to specify certain commands that CommandPrompter should not process. By listing these commands, you can ensure that CommandPrompter does not interfere with their execution.

    Anvil Prompt
    PlayerUI Prompt
    SignUI Prompt
    Input Validation
    PostCommand
    PostCommand

    Permission-Attachment

    The Permission-Attachment configuration involves important settings that require detailed explanation. To better understand how this option works and its implications, please refer to the dedicated page for the Permission-Attachment configuration:

    • Permission-Attachment

    By visiting this page, you will gain insight into the purpose and functionality of the Permission-Attachment configuration in CommandPrompter.


    Enable-Unsafe and Modification-Delay

    These configurations are crucial settings within CommandPrompter that require detailed explanation. To better understand how these options work and their implications, please refer to the dedicated pages for each configuration:

    By visiting the page listed above, you will gain insight into the purpose and functionality of the Enable-Unsafe and Modification-Delay configurations in CommandPrompter.

    Enable-Permission: true

    Example

    When a player with OP privileges joins the server, CommandPrompter will send a message to that player if an update is available.

    Example

    This will set "exit" as the keyword that cancels command prompting.
    # Word that cancels command
    # prompting.
    Cancel-Keyword: cancel

    Usage

    Explanation

    Example

    Player Delegate

    The player delegate command is derived from the Console Delegate feature. That means this command can only be called from the console.

    The only difference is the format of the command (which requires an additional permission attachment), and after prompt completion, the completed command is executed as a player, not a console.

    The Player Delegate Command

    As I've mentioned before, this command can only be executed through the console. However, it's important to note that the completed command will be executed by the player.

    Usage

    The player delegate command has the following format:

    playerdelegate <target_player> <permission attachment name> <command...> 

    The last part of the command is a greedy argument, therefore anything past the permission attachment will be considered as a command.

    Permission attachments are user-defined, however, if you don't want to use any, you can just pass NONE as the permission attachment.

    To add more commands to the list of ignored commands, use the following configuration:

    This will include anotherCommand in the list of commands ignored by CommandPrompter.


    Adjust the content to fit your documentation style and requirements.

    Usage

    Explanation

    VentureChat channels are automatically ignored by CommandPrompter

    Example

    Update-Checker: false
    Cancel-Keyword: exit
    # What commands should CommandPrompter ignore
    # 
    # When a command is ignored, CommandPrompter
    # will not proceed to check if the command
    # contains a prompt.
    # 
    # Do not include the /
    # 
    # VentureChat channels are automatically ignored.
    Ignored-Commands:
    - sampleCommand
    - sampleCommand2
    Ignored-Commands:
    - sampleCommand
    - sampleCommand2
    - anotherCommand
    consoledelegate CyR1en gamemode <what gamemode> %target_player%
    gamemode creative CyR1en
    consoledelegate CyR1en gamemode <what gamemode> %target_player% <-exa broadcast Gamemode changed to p:0 for %target_player%>
    broadcast Gamemode changed to creative for CyR1en

    Example

    Example with PostCommand

    Post Command for Console Delegate will also be executed as the console

    Video Example

    Fancy-Logger

    The Fancy-Logger option enables a stylish logger for CommandPrompter.

    Usage

    You can configure the Fancy-Logger by editing the "config.yml" file as follows:

    # Enable fancy logger
    # Do /commandprompter reload to
    # apply the change
    Fancy-Logger: true

    In this example, the fancy logger is enabled (true).

    Explanation

    Enabling the Fancy-Logger option allows CommandPrompter to utilize a visually enhanced logger for displaying information. The fancy logger provides a more appealing and user-friendly interface for logging activities related to CommandPrompter.

    Example

    To disable the fancy logger, use the following configuration:

    This will deactivate the fancy logger for CommandPrompter.

    Debug-Mode

    The Debug-Mode option enables debug mode for CommandPrompter.

    You can configure the Debug-Mode by editing the "config.yml" file as follows:

    In this example, debug mode is enabled (true).

    Enabling the Debug-Mode option allows CommandPrompter to operate in debug mode, which can be useful for troubleshooting and identifying issues. Debug mode provides additional information and logs for developers to diagnose and resolve problems.

    Chat Prompt

    Controls the settings for .

    Allowed-Commands-In-Prompt

    The Allowed-Commands-In-Prompt option defines a list of commands that CommandPrompter allows when a player executes another command while completing a prompt.

    You can configure the Allowed-Commands-In-Prompt by editing the appropriate configuration file, typically named "config.yml" or similar, with the following:

    In this example, the specified commands (sampleCommand, sampleCommand2) are allowed to be executed while completing a prompt.

    The Allowed-Commands-In-Prompt

    Cancel-Hover-Message
  • Response-Listener-Priority

  • Chat Prompt
    Clickable-Cancel
    Cancel-Message
    Fancy-Logger: false
    To disable debug mode, use the following configuration:

    This will deactivate debug mode for CommandPrompter.

    # Enable debug mode for CommandPrompter.
    Debug-Mode: true

    Usage

    Explanation

    Example

    option is designed to control which commands are permitted when a player is in the process of completing a prompt. This allows users to execute specific commands without canceling the ongoing prompt, enhancing flexibility and user experience.

    To add or remove commands from the allowed list, modify the configuration as needed:

    This will update the list to allow the execution of newCommand in addition to the existing allowed commands.

    • Commands listed in Allowed-Commands-In-Prompt should not include the "/" prefix.

    • Allowed commands that contains prompts will still be blocked.

    Usage

    Explanation

    Example

    Important Notes

    Debug-Mode: false
    Allowed-Commands-In-Prompt:
    - sampleCommand
    - sampleCommand2
    Allowed-Commands-In-Prompt:
    - sampleCommand
    - newCommand

    Clickable-Cancel

    The TextPrompt.Clickable-Cancel option enables clickable cancel functionality in the TextPrompt feature.

    Usage

    You can configure the TextPrompt.Clickable-Cancel by editing the "prompt-config.yml" file as follows:

    TextPrompt:
      Clickable-Cancel: true

    In this example, the clickable cancel functionality is enabled.

    Explanation

    The TextPrompt.Clickable-Cancel option allows you to provide users with the ability to cancel command completion through a clickable option. Enabling this feature can enhance user interaction and make the cancellation process more convenient.

    Example

    To disable the clickable cancel functionality, use the following configuration:

    This will disable the clickable cancel option.

    Command-Tab-Complete

    The Command-Tab-Complete option enables command tab completion for CommandPrompter.

    Usage

    You can configure the Command-Tab-Complete by editing the "config.yml" file as follows:

    # Enable command tab complete
    # for CommandPrompter
    Command-Tab-Complete: true

    In this example, command tab completion is enabled (true).

    Explanation

    Enabling the Command-Tab-Complete option allows CommandPrompter to provide tab completion functionality for commands. This feature assists users by suggesting or automatically completing commands based on the input provided.

    Example

    To disable command tab completion, use the following configuration:

    This will deactivate command tab completion for CommandPrompter.

    Prompts Configuration

    The prompt-config.yml file contains various configuration options that allow customization and control over the prompts and user interfaces in the CommandPrompter plugin. This configuration file is essential for managing the behavior and appearance of different prompt-related features within the plugin. Below are the key configuration options available in the prompt-config.yml file:

    • Player UI: Configures the visual aspects and behavior of the .

    Player UI

    Configures the visual aspects and behavior of the .

    Skull-Name-Format

    The PlayerUI.Skull-Name-Format option determines the display name format for the player heads in the PlayerUI.

    You can configure the PlayerUI.Skull-Name-Format by editing the "prompt-config.yml" file as follows:

    In this example, the display name format is set to &6%s.

    The PlayerUI.Skull-Name-Format allows you to define the formatting for the display names associated with player heads in the PlayerUI feature. You can customize this format to enhance the visual appearance of the player heads.

    Size
  • Cache-Size

  • Cache-Delay

  • PlayerUI Control Items

  • Sorted

  • Per-World

  • Empty-Message

  • Player UI Prompt
    Skull-Name-Format
    Skull Custom Model Data
    TextPrompt:
      Clickable-Cancel: false
    Command-Tab-Complete: false
    To change the display name format to display in a different color, use the following configuration:

    This will display the player heads with names in green color.

    PlayerUI:
      Skull-Name-Format: '&6%s'

    Usage

    Explanation

    Example

    PlayerUI:
      Skull-Name-Format: '&a%s'
    Anvil UI: Manages the settings related to Anvil UI Prompt.
  • Chat Prompt: Controls the settings for Chat Prompt.

  • Sign UI: Defines the configuration for the Sign UI Prompt.

  • For detailed information on each configuration option and its specific parameters, refer to the individual pages corresponding to each configuration option within the prompt-config.yml file.


    Feel free to customize this overview based on your documentation requirements.

    Player UI Prompt

    Input validation has it's own page here:

    Skull Custom Model Data

    Skull Custom Model Data Configuration

    The Skull-Custom-Model-Data option allows server managers to set a custom model data for the player heads that appear under the PlayerUI.

    Usage

    You can configure the Skull-Custom-Model-Data option by editing the appropriate configuration file, typically named "prompt-config.yml" or similar, with the following:

    Skull-Custom-Model-Data: 0

    In this example, the custom model data for player heads is set to 0.

    Explanation

    The Skull-Custom-Model-Data option enables server managers to customize the appearance of player heads displayed under the PlayerUI by setting a custom model data. This allows for unique visual representations of player heads within the user interface.

    Example

    To modify the custom model data for player heads, adjust the configuration as needed:

    This will set the custom model data for player heads to 123 within the PlayerUI.

    Cancel-Message

    The TextPrompt.Cancel-Message option specifies the clickable text message for canceling command completion in the TextPrompt feature.

    Usage

    You can configure the TextPrompt.Cancel-Message by editing the "prompt-config.yml" file as follows:

    TextPrompt:
      Cancel-Message: '&7[&c&l✘&7]'

    In this example, the cancel message is set to "[✘]" in red color.

    Explanation

    The TextPrompt.Cancel-Message option allows you to define the message that appears as the clickable option for canceling command completion. This message provides users with a visual cue to initiate the cancellation process.

    Example

    To customize the cancel message, use the following configuration:

    This will display "[Cancel]" in dark red color as the cancel message.

    Cancel-Hover-Message

    The TextPrompt.Cancel-Hover-Message option specifies the message to show when a player hovers over the clickable cancel message in the TextPrompt feature.

    Usage

    You can configure the TextPrompt.Cancel-Hover-Message by editing the "prompt-config.yml" file as follows:

    TextPrompt:
      Cancel-Hover-Message: '&7Click here to cancel command completion'

    In this example, the hover message is set to "Click here to cancel command completion" in gray color.

    Explanation

    The TextPrompt.Cancel-Hover-Message option allows you to define the message that appears when a player hovers over the clickable cancel message. This message provides additional context or instruction to users regarding the functionality of the cancel option.

    Example

    To customize the hover message for the cancel option, use the following configuration:

    This will display "Press to end completion" in gray color when a player hovers over the clickable cancel message in the.

    Show-Completed-Command

    The Show-Complete-Command option determines whether CommandPrompter should send the completed command to the player before dispatching it.

    You can configure the Show-Complete-Command by editing the "config.yml" file as follows:

    In this example, the option to show the completed command is enabled (true).

    Enabling the Show-Complete-Command option allows players to view the final form of their command before it is executed. This feature can help prevent mistakes and ensure that the intended command is dispatched accurately.

    Size

    The PlayerUI.Size option determines the size of the UI for the PlayerUI feature.

    You can configure the PlayerUI.Size by editing the "prompt-config.yml" file as follows:

    In this example, the size of the UI is set to 54.

    The PlayerUI.Size option allows you to specify the size of the UI for displaying player heads. Adjusting this value determines the number of slots available in the UI layout.

    To set the size of the UI to 36, use the following configuration:

    Response-Listener-Priority

    The TextPrompt.Response-Listener-Priority option allows you to change the priority of the response listener for Chat Prompt.

    You can configure the TextPrompt.Response-Listener-Priority by editing the "prompt-config.yml" file as follows:

    In this example, the response listener priority is set to DEFAULT.

    To change the response listener priority to a different level, use one of the following values: LOW, LOWEST,

    Input Validation
    TextPrompt:
      Cancel-Message: '&7[&4Cancel&7]'
    TextPrompt:
      Cancel-Hover-Message: '&7Press to end completion'
    This will adjust the size of the UI to have 36 slots.

    Feel free to adjust the content as needed to fit your documentation style and requirements.

    Usage

    This can only be multiples of 9 with 18 being the minimum and 54 being the max.

    Explanation

    Example

    Ignore MiniMessage

    The Ignore-MiniMessage option allows users to configure whether CommandPrompter ignores MiniMessage syntax when parsing prompts.

    Usage

    You can customize the Ignore-MiniMessage option by editing the appropriate configuration file, typically named "config.yml" or similar, with the following:

    Ignore-MiniMessage: true

    In this example, CommandPrompter is configured to ignore MiniMessage syntax.

    Explanation

    The Ignore-MiniMessage option ensures that CommandPrompter's parser does not mistake MiniMessage syntax for a prompt. This prevents conflicts and allows users to use both CommandPrompter and MiniMessage without interference.

    Example

    To disable the ignoring of MiniMessage syntax, set the configuration as follows:

    This will enable CommandPrompter to parse MiniMessage syntax along with prompts.

    Cache-Size

    The PlayerUI.Cache-Size option determines the size of the head cache in the PlayerUI feature.

    Usage

    You can configure the PlayerUI.Cache-Size by editing the "prompt-config.yml" file as follows:

    PlayerUI:
      Cache-Size: 256

    In this example, the head cache size is set to 256.

    Explanation

    The PlayerUI.Cache-Size option specifies the maximum number of player heads that can be stored in the cache. Adjusting this value allows you to control the capacity of the cache to accommodate the desired number of player heads.

    Example

    To set the cache size to 128, use the following configuration:

    This will limit the head cache to store a maximum of 128 player heads.

    To disable the display of the completed command, use the following configuration:

    This will prevent the completed command from being shown to the player.

    # Should CommandPrompter send
    # the completed command to the
    # player before dispatching it?
    Show-Complete-Command: true

    Usage

    Explanation

    Example

    NORMAL
    ,
    HIGH
    , or
    HIGHEST
    in the configuration:

    This will set the response listener priority to HIGH.

    TextPrompt:
      Response-Listener-Priority: DEFAULT

    Usage

    Example

    Skull-Custom-Model-Data: 123
    PlayerUI:
      Size: 54
    PlayerUI:
      Size: 36
    Ignore-MiniMessage: false
    PlayerUI:
      Cache-Size: 128
    Show-Complete-Command: false
    TextPrompt:
      Response-Listener-Priority: HIGH

    Sorted

    The PlayerUI.Sorted option determines whether the player heads in the PlayerUI feature should be sorted by the name of the players.

    Usage

    You can configure the PlayerUI.Sorted by editing the "prompt-config.yml" file as follows:

    PlayerUI:
      Sorted: false

    In this example, the player heads are not sorted.

    Explanation

    The PlayerUI.Sorted option allows you to control whether the player heads should be displayed in a sorted order within the PlayerUI feature. Enabling sorting can help organize the player heads for easier navigation.

    Example

    To enable sorting for the player heads, use the following configuration:

    This will sort the player heads within the PlayerUI feature.

    Per-World

    The PlayerUI.Per-World option determines whether the listed players in the PlayerUI feature should be limited to players within the same world as the PlayerUI user.

    Usage

    You can configure the PlayerUI.Per-World by editing the "prompt-config.yml" file as follows:

    PlayerUI:
      Per-World: false

    In this example, the option to limit the listed players to the same world is disabled.

    Explanation

    The PlayerUI.Per-World option allows you to control whether the PlayerUI feature should display only the players within the same world as the user accessing the PlayerUI. Enabling this option can help focus the selection on players within the same game environment.

    Example

    To enable the restriction of listed players to the same world, use the following configuration:

    This will limit the listed players to those within the same world as the PlayerUI user.

    Empty-Message

    The PlayerUI.Empty-Message option specifies the message to be displayed when the head cache is empty in the PlayerUI feature.

    You can configure the PlayerUI.Empty-Message by editing the "prompt-config.yml" file as follows:

    In this example, the empty message is set to "No players found!" in red color.

    The PlayerUI.Empty-Message option allows you to define the message that appears when there are no players to display in the PlayerUI feature. This message informs users that there are no available players to select.

    To customize the empty message, use the following configuration:

    PlayerUI Control Items

    The control items in the PlayerUI feature include the Previous, Next, and Cancel options, each with specific configuration:

    • Item: Specifies the item displayed for the Previous control.

    • Custom-Model-Data: Sets the custom model data for the item.

    Cache-Delay

    The PlayerUI.Cache-Delay option determines the delay in ticks after a player joins before their head gets cached in the PlayerUI feature.

    You can configure the PlayerUI.Cache-Delay by editing the "prompt-config.yml" file as follows:

    In this example, the cache delay is set to 5 ticks.

    The PlayerUI.Cache-Delay option controls the duration of the delay before a player's head is cached in the PlayerUI feature after they join the server. Adjusting this value allows you to manage the timing of the caching process.

    To set the cache delay to 10 ticks, use the following configuration:

    PlayerUI:
      Sorted: true
    PlayerUI:
      Per-World: true

    This will display the message "There are no online players!" in red color when the head cache is empty.

    PlayerUI:
      Empty-Message: '&cNo players found!'

    Usage

    Explanation

    Example

    This will delay the caching of a player's head by 10 ticks after they join the server.

    PlayerUI:
      Cache-Delay: 5

    Increasing this value might be helpful when player heads are not showing up on the Player UI.

    Usage

    Explanation

    Example

    PlayerUI:
      Empty-Message: '&cThere are no online players!'
    PlayerUI:
      Cache-Delay: 10
    Column: Defines the column in which the Previous control is located.
  • Text: Displays the text associated with the Cancel control.

  • Refer to the "prompt-config.yml" file for the specific configurations related to each control item.

    Item can only be materials found .

    Custom-Title

    The AnvilGUI.Custom-Title option allows you to set a custom title for the Anvil GUI if the title is enabled.

    Usage

    You can configure the AnvilGUI.Custom-Title by editing the "prompt-config.yml" file as follows:

    AnvilGUI:
      Custom-Title: ''

    In this example, no custom title is provided.

    Explanation

    The AnvilGUI.Custom-Title option enables you to define a personalized title for the Anvil GUI when the title is enabled. You can use this feature to provide users with a more descriptive or engaging title that complements the prompt.

    Example

    To set a custom title for the Anvil GUI, use the following configuration:

    This will display "Enter Your Text Here" as the custom title in the Anvil GUI.

    Filter-Format

    The PlayerUI.Filter-Format option allows users to configure the display format for heads in the Player UI based on different filters.

    Usage

    You can customize the PlayerUI.Filter-Format by editing prompt-config.yml

    PlayerUI:
      Filter-Format:
        World: '&6𑁍 %s'
        Radial: '&cᯤ %s'

    In this example, we set the format for both World and Radial. Not all filters will be configured to have a format by default. However, if there are no format defined, it will use the Skull-Name-Format config.

    Filters are implemented in code and you can't just add filter format on this configuration. To see the list of available filters please refer to

    Explanation

    The PlayerUI.Filter-Format option enables users to tailor the display format of heads in the Player UI based on different filters.

    To modify the display format for a particular filter, adjust the configuration as needed:

    • The %s placeholder represents the player's name and will be replaced dynamically in the display format.

    • Customize the display formats according to your preferences to enhance the visual representation of heads in the Player UI.

    Enable-Title

    The AnvilGUI.Enable-Title option determines whether to show the first line of the prompt (if with {br}) as the title of the Anvil GUI.

    Usage

    You can configure the AnvilGUI.Enable-Title by editing the "prompt-config.yml" file as follows:

    AnvilGUI:
      Enable-Title: true

    In this example, the option to enable the title is set to true.

    Explanation

    The AnvilGUI.Enable-Title option allows you to control whether the first line of the prompt is displayed as the title in the Anvil GUI. Enabling this option can provide users with a clearer context for their input within the Anvil GUI.

    Example

    To disable the display of the first line of the prompt as the title, use the following configuration:

    This will prevent the first line of the prompt from being shown as the title in the Anvil GUI.

    Anvil UI

    Manages the settings related to .

    Item

    The AnvilGUI.Item option specifies the item to be placed on the Anvil GUI.

    You can configure the AnvilGUI.Item by editing the "prompt-config.yml" file as follows:

    In this example, the item on the Anvil GUI is set to Paper with a custom model data of 0.

    The AnvilGUI.Item option allows you to define the specific item that appears on the Anvil GUI. You can customize the material and additional properties, such as custom model data, to enhance the visual representation of the item for users.

    Prompt-Message

    The AnvilGUI.Prompt-Message option specifies the message to be displayed on the Anvil GUI

    You can configure the AnvilGUI.Prompt-Message by editing the "prompt-config.yml" file as follows:

    In this example, no prompt message is provided.

    The AnvilGUI.Prompt-Message option allows you to define a message that provides guidance or instructions for users within the Anvil GUI. You can use this message to prompt users on what type of input is expected or guide them through the input process.

    To set a prompt message for the Anvil GUI, use the following configuration:

    here
    Prompt-Message
  • Item

  • Enchanted

  • Anvil UI Prompt
    Enable-Title
    Custom-Title

    Sign UI

    Defines the configuration for the Sign UI Prompt.

    • Input-Field-Location

    • Material

    AnvilGUI:
      Custom-Title: 'Enter Your Text Here'

    Example

    Important Notes

    this page.
    AnvilGUI:
      Enable-Title: false

    To change the item on the Anvil GUI to a different material with custom model data, use the following configuration:

    This will display a Diamond item with custom model data 123 on the Anvil GUI.

    Can only be materials found here.

    Usage

    Explanation

    Example

    This will display "Please enter your text here:" as the prompt message in the Anvil GUI.

    AnvilGUI:
      Prompt-Message: ''

    Usage

    Explanation

    Example

    PlayerUI:
      Filter-Format:
        World: '&6(w) %s'
        Radial: '&c(r) %s'
    AnvilGUI:
      Item:
        Material: Paper
        Custom-Model-Data: 0
    AnvilGUI:
      Item:
        Material: Diamond
        Custom-Model-Data: 123
    AnvilGUI:
      Prompt-Message: 'Please enter your text here:'

    Enchanted

    The AnvilGUI.Enchanted option determines whether the item on the Anvil GUI should be displayed as enchanted.

    Usage

    You can configure the AnvilGUI.Enchanted by editing the "prompt-config.yml" file as follows:

    AnvilGUI:
      Enchanted: false

    In this example, the item on the Anvil GUI is not displayed as enchanted.

    Explanation

    The AnvilGUI.Enchanted option allows you to control whether the item should appear as enchanted on the Anvil GUI. Enabling this option can add a visually enhanced effect to the item, providing a more distinct appearance for users.

    Example

    To display the item on the Anvil GUI as enchanted, use the following configuration:

    This will present the item on the Anvil GUI with an enchanted visual effect.

    Input-Field-Location

    The SignUI.Input-Field-Location option specifies the line from which the answer should be read in the Sign UI feature.

    Usage

    You can configure the SignUI.Input-Field-Location by editing the "prompt-config.yml" file as follows:

    SignUI:
      Input-Field-Location: bottom

    In this example, the input field is set to be read from the bottom line of the sign.

    Explanation

    The SignUI.Input-Field-Location option determines the specific line on the sign that should be considered as the input field. This setting helps identify where the user's response will be located within the Sign UI feature.

    Example

    To change the input field location to a different line, use one of the following values: top, top-aggregate, bottom, or bottom-aggregate in the configuration:

    This will set the input field location to the top line of the sign in the Sign UI feature.

    Material

    The SignUI.Material option specifies the material used for the signs in the Sign UI feature.

    You can configure the SignUI.Material by editing the appropriate configuration file, typically named "config.yml" or similar, with the following:

    In this example, the material for signs is set to OAK_SIGN.

    The SignUI.Material option allows you to define the material used for signs within the Sign UI feature. The specified material determines the appearance of the signs during user interactions.

    Chat Prompt

    A text prompt is the most basic prompt type for CommandPrompter. It simply uses chat to get answers from the player.

    Text Prompt

    Sign UI Prompt

    Sign UI is a new addition that was introduced on Project Secundum and was only tested on 1.17+ versions of Minecraft.

    SignUI Prompt
    AnvilGUI:
      Enchanted: true
    SignUI:
      Input-Field-Location: top
    To change the material for signs to a different type, update the configuration as follows:

    This will set the material for signs to SPRUCE_SIGN within the Sign UI feature.

    The value assigned to SignUI.Material should match a valid Minecraft material, typically containing the word "SIGN." Common examples include OAK_SIGN, BIRCH_SIGN, ACACIA_SIGN, and more.

    Refer to the Minecraft Materials documentation for a comprehensive list of available materials.

    Usage

    Explanation

    Example

    Valid Materials

    SignUI:
      Material: OAK_SIGN
    SignUI:
      Material: SPRUCE_SIGN

    Color Support

    Example

    The example below shows the command with a prompt and a corresponding image of its appearance

    Prompt Argument

    None

    Break lines

    Yes, {br} signifies a break-line and CommandPrompter will send each line one by one

    /gamemode <&6&lWhat gamemode?{br}0. Survival{br}1. Creative{br}2. Adventure{br}3. Creative>

    Color Support

    No. Due to limitations, for now, SignGUI does not support colors.

    Configurable

    Notable feature (Subject to change)

    • Two types: Single Argument and Multi Argument

      • Single Argument: A single argument SignUI prompt is the default type. It will simply put the prompt on the very first line of the sign and will combine every following line into one (separated by spaces).

      • Multi Argument: A multi argument SignUI is determined by an occurrence of the character :. Everything typed after the : is considered an answer.

    Example

    The examples below shows the command with a prompt and a corresponding image of its appearance

    • Single Argument:

      /gamemode <-s What gamemode?>
    • Multi Argument:

      /time <-s Time Command{br}Add or Set:{br}Value:>

      Let's say I typed add and 1600, the command to dispatch is going to be /time add 1600

    Prompt Argument

    -s (space after is required)

    Break lines

    Yes

    Player UI Prompt

    The player UI prompt uses the native inventory interface and places all of the online players into it to allow players to select a player.

    PlayerUI Prompt

    Prompt Argument

    -p:<filter> (space after is required)

    Break lines

    Filters are used to filter out player heads from the Player UI. You also have the ability to customize the head's display by changing its format in the name depending on the filter.

    Available filters so far:

    Filter
    Key
    Description

    additional filters will be added in the future

    Example

    The example below shows the command with a prompt and a corresponding image of its appearance

    Video example:

    Anvil UI Prompt

    As the name suggests, anvil prompt uses the native anvil interface to prompt the player.

    Anvil Prompt

    Prompt Argument

    -a (space after is required)

    Break lines

    Yes, {br} signifies a break-line and CommandPrompter will put every line (except the first one, since it's the title/item display name) and make them as the item's lore.

    Example

    The example below shows the command with a prompt and a corresponding image of its appearance

    Input Validation

    CommandPrompter's input validation uses regex to check for the input. To use it, you have to define an input validator in the prompt-config.ym under the key Input-Validation and use it as a prompt argument for your prompt

    Input Validator

    An input validator could have any key. But under that key, there must be an Alias and at least oneInput Validation. There's also an optional key that you can set called Err-Message. The following is an example of input validators that's included with CommandPrompter by default.

    Validators

    Validator
    Key
    Description

    Once you have input validators defined, you can use them by using the prompt argument -iv:<validator alias>. For example:

    Since it's a prompt argument, it won't affect other prompt's input validation so you can have something like the following:

    If it doesn't pass the regex test, the plugin sends the error message and sends the prompt again.

    To learn more about regular expressions click

    Regex

    Regex

    validates an input by checking if it matches the defined regular expression

    Online Player

    Online-Player

    validates an input by checking if it's a username of one of the online players

    Usage

    here
    Input-Validation:
      Integer-Sample:
        Alias: is
        Regex: '^\d+'
        Err-Message: '&cPlease enter a valid integer!'
      Alpha-Sample:
        Alias: as
        Regex: '[A-Za-z ]+'
        Err-Message: '&cInput must only consist letters of the alphabet!'
      Online-Validator:
        Alias: ov
        Online-Player: true
        Err-Message: '&cThat player is not online!`
    /command <-iv:is integers only!>
    /command <-iv:as alphas only!>
    /command <-iv:ov online players only!>
    /command <-iv:is enter only integers> <-iv:as enter only alphas> <-iv:ov online players only!>

    Towny Town

    tt

    only show players with the same town of the prompted player.

    Towny Nation

    tn

    only show players under the same nation of the prompted player.

    Husk Towns

    ht

    only show players with the same town of the prompted player.

    LuckPerms Own Group

    lpo

    only show players with the same group as the prompter player.

    LuckPerms Group

    lpg<groupname>;

    only show players with the defined group. the filter must end with ; !

    Self Filter

    s

    filter out the player that invoked the prompt.

    No

    Color Support

    Yes, UI colors configuration can be found in prompt-config.yml

    Configurable

    Yes (prompt-config.yml)

    World

    w

    only show players on the same world as the prompted player.

    Radial

    r<radius value>

    only show players within a specific radius of the prompted player.

    /mute <-p Who do you want to mute?>

    Filters

    You can combine filters. So if you want to mix radial and world filter you can have the following filter wr10 or `r10w`. The format of the filter that comes first will be used.

    configuration

    Color Support

    Yes

    Configurable

    Yes

    /gamemode <-a &6&lWhat gamemode?{br}0. Survival{br}1. Creative{br}2. Adventure{br}3. Creative>
    Yes
    Yes
    ko-fi
    https://cdn.discordapp.com/attachments/936347464791883867/1169911067279904818/2023-11-03_01-48-24.mp4?ex=65571f96&hm=68a370a744c88689f779b3269e33e1a34e6942913ed99cc454c2650ac8fa4671&is=6544aa96cdn.discordapp.com
    https://cdn.discordapp.com/attachments/936346802951716880/1184752613003108392/2023-12-13_23-51-00.mp4?ex=658d1dda&hm=b4bcf5e70a5ec0109536bbcf05f97f9512752b3bf79d2fcc14dd6ba131347731&is=657aa8dacdn.discordapp.com