Skip to content

Messages ​

Everything the plugin says lives in messages.yml. The file is written on the first start with every message and its default text, so you can change what players read without touching the code.

plugins/appeltoolsvelocity/messages.yml
plugins/AppelToolsPaper/messages.yml

How a message is written ​

A message is a piece of MiniMessage, so it can carry colours, bold text and clickable buttons:

yaml
prefix:
  normal: "<yellow><bold>AppelTools<reset> <dark_gray>» "
  staff: "<yellow><bold>AppelStaff<reset> <dark_gray>» "

The prefix is what is put in front of a chat or a broadcast message. There is one for the normal chat, one for the staff chat, and the proxy has extra ones for the punishments, the party chat and the friends.

Placeholders ​

Some messages have a placeholder that the plugin fills in. A placeholder is written between braces:

yaml
economy:
  pay-success: "<green>Je hebt <yellow>${AMOUNT} <green>betaald aan <yellow>{TARGET}<green>."
PlaceholderWhat it holds
{BALANCE}The balance of the account.
{AMOUNT}The amount of money.
{TARGET}The name of the player it is about.
{PLAYER}The name of the player who did it.
{REASON}The reason of a punishment or a report.
{SERVER}The name of the server.
{SERVER_NAME}The name of the server, in the restart and the join messages.
{SERVER_IP}The address of the network.
{TIME_LEFT}The time that is left, written out.
{PAGE} / {MAX_PAGES}The page of a list and how many there are.
{DATE}The date of the event.

The generated file lists the placeholders of every section in a comment above it, so you do not have to guess:

yaml
# ----------------------------------------------------------------------------
# Home
# Placeholders: {HOME}, {NAME}, {WORLD}, {X}, {Y}, {Z}, {OLD}, {NEW}, {PLAYER}
# ----------------------------------------------------------------------------

TIP

Keep the placeholders. A message that loses its {TARGET} simply shows the text without the name — but a message that keeps a placeholder the plugin does not know shows the placeholder itself.

A message in one line or in many ​

A message may be a single line or a list of lines. Both work:

yaml
rules:
  message:
    - "<yellow><bold>Rules"
    - "<gray>1. Be nice to each other."
    - "<gray>2. No cheating."

The store of the messages file accepts both shapes, so you can turn one line into a list of lines without changing the key.

The sections of the backend ​

SectionWhat it holds
prefixThe prefixes of the chat.
economyThe balance, the payments and the leaderboard.
gamemodeThe confirmation of a gamemode.
speedThe speed and the flight.
errors"You do not have permission", "Only players can do this" and the rest.
staffThe freeze, the tool kit and the saved inventory.
reloadThe two lines of a reload.
modulesSwitching a module on and off.
notesThe notes of a player.
usageA command that was used wrong.
backGoing back to the last place.
homeThe homes.
teleportThe teleport, the requests and the cooldown.
statsThe statistics and the statistics GUI.
seenWhen a player was last online.
altsThe accounts that share an address.
geoipWhere a player connects from.
transaction-historyThe log of the balance changes.
two-factorThe messages of the reset command.

The sections of the proxy ​

SectionWhat it holds
announcementsThe announcements that are broadcast on an interval.
prefixThe prefixes: normal, punishment, silent punishment, staff, party and friends.
staffThe broadcast and the staff chat.
staff-notificationsThe joins, the leaves and the switches of the staff.
messageThe private messages.
reportThe reports.
partyThe parties.
friendsThe friends.
chat-channelThe switch to another chat channel.
punishmentThe bans, the mutes, the kicks and their address variants.
restartThe countdown of a restart.
maintenanceThe maintenance mode.
server-infoThe information of the server in the server list.
rulesThe rules that /rules shows.
errorsThe errors.
reloadThe two lines of a reload.
modulesSwitching a module on and off.
chatThe state of the chat.
joinThe message that is broadcast when a player joins.
two-factorThe two-factor: the message that holds a staff member, the answers of /verify and /2fasetup and the confirmation of a reset.

TIP

The rules are messages, not configuration: they live in the rules section of messages.yml, not in config.yml.

The language ​

server.locale is en or nl. It decides the words that the plugin writes for a duration — "5 minutes" or "5 minuten" — and the words for "on" and "off". An unknown value falls back to Dutch, and a change needs a restart.

The texts of the messages are not translated: they are MiniMessage, and you change them in messages.yml. The format of the dates is the same in every language.

Reading the file again ​

/atp reload and /atv reload read the messages again. A message that you change is live from that moment on.

The file is written back on every start as well: a key that a newer version of the plugin adds appears with its default, and a message that you changed keeps your text.

Built with VitePress.