Skip to content

messages.yml

Edit, disable and translate every message OptimalAFKZone sends, plus optional titles and action bars.

Every message lives in messages.yml. Each supports legacy & codes, &#hex, MiniMessage and (with PlaceholderAPI) %...%. After editing, run /afkzoneadmin reload.

Messages:
SHARDS-EARNED:
Message:
Enabled: true
Value:
- '&5[&d&lAFK&5] &7You earned &f{shards} {currency}&7.'
  • Enabled: false silences a message entirely.
  • Value is a string or a list - every line is sent (used for the bordered help panels).
  • Start a line with [center] to centre it in chat.
  • Keep the {tokens} intact; don’t rename the message keys.

Missing keys are re-added with their defaults the next time the file loads, so you can delete a block to reset it.

Any message can also show a title and subtitle. Add a Title: block next to Message::

Messages:
SHARDS-EARNED:
Message:
Enabled: true
Value:
- '&5[&d&lAFK&5] &7You earned &f{shards} {currency}&7.'
Title:
Enabled: true
Title: '&d&l+{shards}'
Sub-Title: '&5{currency} &7earned'
Fade-In: 10
Stay: 60
Fade-Out: 10
  • Title is the large centre line, Sub-Title the smaller line beneath it. Either can be left ''.
  • Fade-In, Stay and Fade-Out are in ticks and optional (default 10, 60, 10).
  • The same {tokens} the message uses resolve in the title and subtitle.
  • Enabled: false hides only the title, leaving the chat message untouched. Disable the chat Message instead to show only the title.
  • Titles only show to players.

SHARDS-EARNED ships with this title disabled; set its Enabled to true to pop every shard payout on screen.

A message can also show one line above the hotbar with an Action-Bar: block:

Action-Bar:
Enabled: true
Value: '&d+{shards} {currency}'

Keep in mind that a zone with Action-Bar-Settings enabled re-sends its own countdown and will replace this line within a couple of seconds.

Errors: PLAYER-ONLY, NO-PERMISSION, INVALID-PLAYER, UNKNOWN-PLAYER, INVALID-NUMBER, INVALID-ZONE, INVALID-BOOSTER, DATA-NOT-LOADED, INVENTORY-FULL, NOT-IN-ZONE, SHARDS-DISABLED, SHOP-DISABLED.

Zones and wand: RELOAD, ZONE-EXISTS, ZONE-CREATED, ZONE-DELETED, ZONE-NO-ACCESS, NO-ZONES, ZONE-LIST, ZONE-LIST-LINE, ZONE-TELEPORTED, WAND-RECEIVED, POSITION-SET, SELECTION-INCOMPLETE, SELECTION-WORLD-MISMATCH, OUTLINE-SHOWN, OUTLINE-HIDDEN, AFK-INFO.

Shards: SHARDS-BALANCE, SHARDS-BALANCE-OTHER, SHARDS-EARNED, SHARDS-GIVEN, SHARDS-RECEIVED, SHARDS-TAKEN, SHARDS-SET, SHARDS-INSUFFICIENT.

Boosters: BOOSTER-GIVEN, BOOSTER-RECEIVED, BOOSTER-ACTIVATED, BOOSTER-ACTIVE, BOOSTER-NONE, BOOSTER-ALREADY-ACTIVE, BOOSTER-WEAKER, BOOSTER-SET, BOOSTER-REMOVED.

Shop: SHOP-PURCHASED, SHOP-LIMIT-REACHED, SHOP-ROTATED, SHOP-NOT-STOCKED.

Help: AFKZONE-HELP, AFKZONE-ADMIN-HELP.

Message Tokens
INVALID-PLAYER, UNKNOWN-PLAYER {player} (as typed)
INVALID-NUMBER {input} (the rejected argument)
INVALID-ZONE {zone} (as typed)
INVALID-BOOSTER {booster} (as typed)
RELOAD {ms} (reload time in milliseconds)
ZONE-EXISTS, ZONE-DELETED {zone} (the id)
ZONE-CREATED {zone} (the id), {blocks} (the zone’s volume)
ZONE-LIST {amount}, {zones} (one ZONE-LIST-LINE per zone)
ZONE-LIST-LINE {zone}, {zone-id}, {world}, {reward-time}, {players}
ZONE-TELEPORTED {zone}
POSITION-SET {position} (1 or 2), {x}, {y}, {z}
OUTLINE-SHOWN, OUTLINE-HIDDEN {zone}, {zone-id}
AFK-INFO {zone}, {next}, {session}, {total}
SHARDS-BALANCE, SHARDS-RECEIVED {shards}, {currency}
SHARDS-BALANCE-OTHER, SHARDS-GIVEN, SHARDS-TAKEN, SHARDS-SET {player}, {shards}, {currency}
SHARDS-EARNED {shards}, {currency}, {multiplier}, {zone}
SHARDS-INSUFFICIENT {price}, {shards} (balance), {currency}
BOOSTER-GIVEN {player}, {booster}, {amount}
BOOSTER-RECEIVED {booster}, {amount}
BOOSTER-ACTIVATED {booster}, {multiplier}, {duration}
BOOSTER-ACTIVE, BOOSTER-ALREADY-ACTIVE {multiplier}, {duration} (time left)
BOOSTER-WEAKER {multiplier} (the permission booster)
BOOSTER-SET {player}, {multiplier}, {duration}
BOOSTER-NONE, BOOSTER-REMOVED {player}
SHOP-PURCHASED {amount}, {item}, {price}, {currency}
SHOP-ROTATED {shop} (the shop id), {shop-command}, {command}, {admin-command}
AFKZONE-HELP, AFKZONE-ADMIN-HELP {command}, {admin-command}, {shop-command}

{duration} prints Permanent for a booster with no expiry.

  • SHOP-ROTATED is broadcast to every online player and the console when a shop with Rotation.Announce: true rotates on its timer. A rotation made while the server starts (a new shop, or one that came due while the server was offline) is not announced.
  • INVALID-PLAYER (“is not online”) is sent by the booster admin commands, which only work on online players. UNKNOWN-PLAYER (“has never joined this server”) is sent by /afkzoneadmin shards and /afkzone shards <player>, which also work on offline players and only fail for a name the server has never seen. An older messages.yml gets UNKNOWN-PLAYER added on the next load.
  • DATA-NOT-LOADED is sent when a player’s data is still loading right after they join (for an admin command on them, or when they right-click a booster).