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

message_self

message_self sends a formatted message back to the player who executed the command.

It is the simplest command type and the easiest place to start when building your first custom commands.

Required fields

type: "message_self" command: /example message: "<green>Hello" enabled: true

Example

commands: notes: type: "message_self" command: /notes [category:word] [message:greedy_string] message: "<white>Category: <gray>%category%<br><white>Message: <gray>%message%" enabled: true permission: "velocitycommands.notes" sound: "ui.toast.in"

How it works

When a player runs the command:

  1. the plugin reads the configured parameters
  2. it replaces any matching parameter placeholders such as %category% and %message%
  3. it replaces built-in placeholders such as %player_name%
  4. it formats the result using MiniMessage or legacy colours
  5. it turns any detected URL into a clickable link
  6. it sends the final message back to the same player
  7. if sound is set, it tries to play the sound for that player

Good use cases

message_self works well for:

  • personal info commands
  • roleplay commands only the sender should see
  • reminders or notes
  • placeholder preview commands
  • quick network utility commands

Example: player info

commands: myinfo: type: "message_self" command: /myinfo message: | <gold>Your Info</gold> <gray>Name: <white>%player_name%</white> <gray>Ping: <white>%player_ping%</white> <gray>Server: <white>%server_name%</white> enabled: true
commands: website: type: "message_self" command: /website message: "<aqua>Visit our store: store.example.com" enabled: true

The plugin automatically makes that URL clickable in chat.

Notes

This command type assumes a player executor

The code casts the source to a player, so it is designed for player use rather than proxy console use.

Parameter placeholders are simple text replacements

If your command contains [category:word], you can use %category% in the message.

Built-in and custom placeholders can be mixed freely

message: "<green>%player_name%</green> created note <yellow>%category%</yellow>: <white>%message%"
Last updated on