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: trueExample
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:
- the plugin reads the configured parameters
- it replaces any matching parameter placeholders such as
%category%and%message% - it replaces built-in placeholders such as
%player_name% - it formats the result using MiniMessage or legacy colours
- it turns any detected URL into a clickable link
- it sends the final message back to the same player
- if
soundis 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: trueExample: clickable help link
commands:
website:
type: "message_self"
command: /website
message: "<aqua>Visit our store: store.example.com"
enabled: trueThe 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