Skip to Content
For more plugins like this, check out: https://dannb.online/ šŸŽ‰
Command Typesmessage_other_player

message_other_player

message_other_player sends a formatted message to another online player.

It is useful for private utility commands, lightweight staff tools, and roleplay-style interactions.

Required fields

type: "message_other_player" command: /example [message:greedy_string] message: "<green>%message%" enabled: true

Important behaviour: target player is added automatically

This command type has special logic in the code.

The plugin automatically inserts a required player argument named otherPlayer at the start of the parameter list.

That means the real usage is effectively always:

/<command> <player> ...

Even though your configured command: field does not include that extra player argument.

Practical example

Configured command:

command: /tellraw [message:greedy_string]

Real usage in game:

/tellraw Steve Hello from the proxy

Where:

  • Steve becomes the internal otherPlayer
  • Hello from the proxy becomes %message%

Example config

commands: tellraw: type: "message_other_player" command: /tellraw [message:greedy_string] message: "<gray>[From %player_name%] <white>%message%" enabled: true permission: "velocitycommands.tellraw"

How it works

When the command runs:

  1. the plugin reads the internally-added otherPlayer argument
  2. it checks whether that player is online on the proxy
  3. it replaces placeholders from your configured parameters
  4. it replaces built-in placeholders using the sender as context
  5. it formats the message and linkifies any URLs
  6. it sends the final message to the target player

If the player is not online

The sender receives:

Player not found!

Placeholder behaviour

Built-in placeholders such as %player_name% are resolved from the sender, not the receiver.

message: "<gray>Message from %player_name%: <white>%message%"

Here, %player_name% refers to the person who ran the command.

Good use cases

  • custom /msg-style systems
  • roleplay actions directed at another player
  • private notices
  • small moderation or helper tools

Recommendation

Document this command type clearly for your staff and admins, because the automatic target-player injection is easy to miss when reading only the config.

Last updated on