Skip to Content
For more plugins like this, check out: https://dannb.online/ 🎉
Getting StartedPlaceholders

Placeholders

Velocity Commands supports two placeholder sources:

  • parameter placeholders from your command: definition
  • built-in placeholders from the player who executed the command

Parameter placeholders

Every parameter becomes a placeholder with the same name.

command: /warn [target:player] [reason:greedy_string] message: "<red>Warned %target% for %reason%"

If the player runs:

/warn Steve Spamming chat

Then:

  • %target% becomes Steve
  • %reason% becomes Spamming chat

Built-in placeholders

The plugin code provides these built-in placeholders:

  • %player_name%
  • %player_id%
  • %player_ping%
  • %proxy_total_players%
  • %server_name%
  • %server_online_players%

What each built-in placeholder means

%player_name%

The executor’s username.

%player_id%

The executor’s UUID.

%player_ping%

The executor’s current ping.

%proxy_total_players%

The total number of players connected to the Velocity proxy.

%server_name%

The name of the server the executor is currently connected to.

If the current server cannot be resolved, the plugin uses Unknown.

%server_online_players%

The number of players connected to the executor’s current backend server.

If the current server cannot be resolved, the plugin uses 0.

Important behaviour

These built-in placeholders are always resolved using the player who ran the command.

That means they describe the executor, not the message recipient.

This matters especially for:

  • message_other_player
  • broadcast
  • console_command

Example: mixing both placeholder types

commands: whoami: type: "message_self" command: /whoami [label:word] message: "<gold>%label%</gold> <white>%player_name%</white> is on <aqua>%server_name%</aqua> with <green>%player_ping%ms</green>" enabled: true

Example: broadcast context

commands: serverinfo: type: "broadcast" command: /serverinfo message: "<aqua>%player_name%</aqua> is currently on <white>%server_name%</white>" enabled: true

This announces details about the person who ran /serverinfo.

Placeholder tips

Keep parameter names descriptive

Good names make the message template easier to read:

command: /mail [target:player] [message:greedy_string]

Avoid placeholder name collisions

Do not create custom parameter names that look too similar to the built-in placeholders unless the distinction is obvious.

If a player is not fully connected to a backend yet, server-related placeholder values may fall back to Unknown or 0.

Last updated on