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...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Download the latest version of CommandPrompter on SpigotMC
Drag and drop the downloaded .jar
file into your server's plugins
folder.
Start the server and you're done!
For versions <2.6.0, ProtocolLib is needed to use SignUI
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.
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 to
to learn more
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
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
Welcome to the official documentation for CommandPrompter! This documentation is designed to provide comprehensive guidance on configuring and utilizing the CommandPrompter plugin effectively.
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.
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:
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!
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.
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
to 120 seconds, use the following configuration:
This will set the timeout to 120 seconds, allowing users two minutes to respond to a prompt.
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:
The Enable-Permission
option enables permission checks before a player can use the prompting feature.
You can configure the Enable-Permission
by editing the "config.yml" file as follows:
In this example, the permission check is set to false
.
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.
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:
This will set "exit" as the keyword that cancels command prompting.
The Prompt-Prefix
option allows you to set a custom prefix for CommandPrompter's PluginMessenger.
You can configure the Prompt-Prefix
by editing the "config.yml" file as follows:
In this example, the prefix is set to [&3Prompter&r]
.
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.
You can set the Prompt-Prefix
to your server's name like this:
This will display prompts with the prefix "[MyServer]".
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.
To disable debug mode, use the following configuration:
This will deactivate debug mode for CommandPrompter.
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.
VentureChat channels are automatically ignored by CommandPrompter
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.
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 to be kept since by default, CommandPrompter’s input processing removes them. The argument -a
changes that prompt to become an .
The Fancy-Logger
option enables a stylish logger for CommandPrompter.
You can configure the Fancy-Logger
by editing the "config.yml" file as follows:
In this example, the fancy logger is enabled (true
).
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.
To disable the fancy logger, use the following configuration:
This will deactivate the fancy logger for CommandPrompter.
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.
To disable the display of the completed command, use the following configuration:
This will prevent the completed command from being shown to the player.
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:
By visiting this page, you will gain insight into the purpose and functionality of the Permission-Attachment
configuration in CommandPrompter.
The Ignore-MiniMessage
option allows users to configure whether CommandPrompter ignores MiniMessage syntax when parsing prompts.
You can customize the Ignore-MiniMessage
option by editing the appropriate configuration file, typically named "config.yml" or similar, with the following:
In this example, CommandPrompter is configured to ignore MiniMessage syntax.
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.
To disable the ignoring of MiniMessage syntax, set the configuration as follows:
This will enable CommandPrompter to parse MiniMessage syntax along with prompts.
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
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.
Controls the settings for .
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.
The TextPrompt.Clickable-Cancel
option enables clickable cancel functionality in the TextPrompt feature.
You can configure the TextPrompt.Clickable-Cancel
by editing the "prompt-config.yml" file as follows:
In this example, the clickable cancel functionality is enabled.
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.
To disable the clickable cancel functionality, use the following configuration:
This will disable the clickable cancel option.
The TextPrompt.Cancel-Message
option specifies the clickable text message for canceling command completion in the TextPrompt feature.
You can configure the TextPrompt.Cancel-Message
by editing the "prompt-config.yml" file as follows:
In this example, the cancel message is set to "[✘]" in red color.
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.
To customize the cancel message, use the following configuration:
This will display "[Cancel]" in dark red color as the cancel message.
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 .
Anvil UI: Manages the settings related to .
Chat Prompt: Controls the settings for .
Sign UI: Defines the configuration for the .
Input validation has it's own page here:
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.
The Update-Checker
option determines whether CommandPrompter can check if it's up to date.
You can configure the Update-Checker
by editing the "config.yml" file as follows:
In this example, the update checker is enabled (true
).
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.
When a player with OP
privileges joins the server, CommandPrompter will send a message to that player if an update is available.
To disable the update checker, use the following configuration:
This will prevent CommandPrompter from checking for updates automatically.
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
, NORMAL
, HIGH
, or HIGHEST
in the configuration:
This will set the response listener priority to HIGH.
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.
To allow for reserved regex tokens like () and [], CommandPrompter escapes the first and last character of this configuration.
To modify the argument regex pattern, use the following configuration:
This will set the argument regex to (.*?)
for identifying command prompts.
If you can't find the information you're looking for in this GitBook, please check the for additional resources and support.
Anvil Prompt
a
Prompt
Changes the prompt to become an Anvil Prompt
PlayerUI Prompt
p
Prompt
Changes the prompt to become a PlayerUI Prompt
SignUI Prompt
s
Prompt
Changes the prompt to become a SignUI Prompt
Disable Sanitation
ds
Prompt
Disables input sanitation for a specific prompt
Input Validation
iv:<alias>
Prompt
Validate an input for a certain prompt. Input Validation
Post Command
exa:<tick delay>
PromptQueue
Add a command to execute after completion. PostCommand
Post Command on Cancel
exac:<tick delay>
PromptQueue
Add a command to execute after completion is cancelled. PostCommand
reload
r
Reloads command prompter.
commandprompter.reload
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)
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.
The Command-Tab-Complete
option enables command tab completion for CommandPrompter.
You can configure the Command-Tab-Complete
by editing the "config.yml" file as follows:
In this example, command tab completion is enabled (true
).
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.
To disable command tab completion, use the following configuration:
This will deactivate command tab completion for CommandPrompter.
The TextPrompt.Cancel-Hover-Message
option specifies the message to show when a player hovers over the clickable cancel message in the TextPrompt feature.
You can configure the TextPrompt.Cancel-Hover-Message
by editing the "prompt-config.yml" file as follows:
In this example, the hover message is set to "Click here to cancel command completion" in gray color.
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.
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.
Configures the visual aspects and behavior of the Player UI Prompt.
The PlayerUI.Cache-Delay
option determines the delay in ticks after a player joins before their head gets cached in the PlayerUI feature.
Increasing this value might be helpful when player heads are not showing up on the Player UI.
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:
This will delay the caching of a player's head by 10 ticks after they join the server.
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:
This will display the message "There are no online players!" in red color when the head cache is empty.
Manages the settings related to .
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.
You can configure the AnvilGUI.Enable-Title
by editing the "prompt-config.yml" file as follows:
In this example, the option to enable the title is set to true
.
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.
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.
The AnvilGUI.Enchanted
option determines whether the item on the Anvil GUI should be displayed as enchanted.
You can configure the AnvilGUI.Enchanted
by editing the "prompt-config.yml" file as follows:
In this example, the item on the Anvil GUI is not displayed as enchanted.
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.
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.
The AnvilGUI.Item
option specifies the item to be placed on the Anvil GUI.
Can only be materials found here.
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.
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.
The SignUI.Input-Field-Location
option specifies the line from which the answer should be read in the Sign UI feature.
You can configure the SignUI.Input-Field-Location
by editing the "prompt-config.yml" file as follows:
In this example, the input field is set to be read from the bottom line of the sign.
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.
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.
This supports UTF-8 encoding
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.
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.
A text prompt is the most basic prompt type for CommandPrompter. It simply uses chat to get answers from the player.
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
Color Support
As the name suggests, anvil prompt uses the native anvil interface to prompt the player.
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.
Color Support
Yes
Configurable
Example
The example below shows the command with a prompt and a corresponding image of its appearance
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.
Prompt Argument
-p:<filter>
(space after is required)
Break lines
No
Color Support
Yes, UI colors configuration can be found in prompt-config.yml
Configurable
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 configuration name depending on the filter.
Available filters so far:
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.
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.
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.
additional filters will be added in the future
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.
Example
The example below shows the command with a prompt and a corresponding image of its appearance
Video example:
Sign UI is a new addition that was introduced on Project Secundum
and was only tested on 1.17+ versions of Minecraft.
Prompt Argument
-s
(space after is required)
Break lines
Yes
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:
Multi Argument:
Let's say I typed add
and 1600
, the command to dispatch is going to be /time add 1600
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
An input validator could have any key. But under that key, there must be an Alias
and at least one#validator. 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.
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
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 here
The PlayerUI.Filter-Format
option allows users to configure the display format for heads in the Player UI based on different filters.
You can customize the PlayerUI.Filter-Format
by editing prompt-config.yml
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 this page.
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.
Defines the configuration for the Sign UI Prompt.
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.
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
.
The console delegate command has the following format:
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:
Post Command for Console Delegate will also be executed as the console
CommandPrompter now allows you to add a command to execute after all of the prompts have been completed called PostCommand
Examples below are in the context of a player. If you're using , the commands will be sent as console, making some commands have the wrong arguments. Adjust your command arguments respectively.
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!
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 also broadcast that the time and weather had 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 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 re-open another menu if the prompt is canceled.
The example above will re-open the punish
menu if the anvil prompt gets canceled.
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.
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.
The player delegate command has the following format:
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.
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.
This can only be multiples of 9 with 18 being the minimum and 54 being the max.
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:
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.
The PlayerUI.Sorted
option determines whether the player heads in the PlayerUI feature should be sorted by the name of the players.
You can configure the PlayerUI.Sorted
by editing the "prompt-config.yml" file as follows:
In this example, the player heads are not sorted.
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.
To enable sorting for the player heads, use the following configuration:
This will sort the player heads within the PlayerUI feature.
The PlayerUI.Cache-Size
option determines the size of the head cache in the PlayerUI feature.
You can configure the PlayerUI.Cache-Size
by editing the "prompt-config.yml" file as follows:
In this example, the head cache size is set to 256.
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.
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.
The AnvilGUI.Custom-Title
option allows you to set a custom title for the Anvil GUI if the title is enabled.
You can configure the AnvilGUI.Custom-Title
by editing the "prompt-config.yml" file as follows:
In this example, no custom title is provided.
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.
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.
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.
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.
The Skull-Custom-Model-Data
option allows server managers to set a custom model data for the player heads that appear under the PlayerUI.
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:
In this example, the custom model data for player heads is set to 0
.
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.
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.
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:
This will display "Please enter your text here:" as the prompt message in the Anvil GUI.
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.
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.
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.
You can configure the PlayerUI.Per-World
by editing the "prompt-config.yml" file as follows:
In this example, the option to limit the listed players to the same world is disabled.
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.
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.
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.
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.
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!
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.
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.
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 here.