messages.yml
Edit, disable and translate every message OptimalCrates sends, plus optional screen titles and action bars.
Every message lives in messages.yml. Each supports legacy & codes, &#hex, MiniMessage,
[center] and (with PlaceholderAPI) %...%. After editing, run /cratesadmin reload.
Format
Section titled “Format”Messages: KEYS-RECEIVED: Message: Enabled: true Value: - '&5[&d&lCrates&5] &7You received &f{amount}x {crate} &7crate key(s).'Enabled: falsesilences a message entirely.Valueis a list. Every line is sent (used for the summary and help panels).- Start a line with
[center]to center 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.
Titles and action bars
Section titled “Titles and action bars”Any message can also show a title, an action bar, or both. Add a Title: or Action-Bar: block
next to Message::
Messages: CRATE-OPENED: Message: Enabled: true Value: - '' - '&d&l{crate} Crate Summary' - '&8Opened {amount} crate(s) in {ms}ms' - '' - '{print-rewards}' - '' Title: Enabled: false Title: '&2&m━━━&r &a&lCrate &f&l{crate} &a&lOpened &2&m━━━&r' Sub-Title: '&7You opened &f{amount} &7crate(s)!' Fade-In: 10 Stay: 60 Fade-Out: 10 Action-Bar: Enabled: true Value: '&7Opened &f{amount}x {crate}'Titleis the large center line,Sub-Titlethe smaller line beneath it. Either can be''.Fade-In,StayandFade-Outare in ticks and default to10,60and10.Action-Barshows one line above the hotbar.- The same
{tokens}the message uses work in the title and action bar. - Each block has its own
Enabled, so you can keep the chat message and disable the title, or the other way round.
CRATE-OPENED ships with a title block, disabled. Set Enabled: true to turn it on.
Message keys
Section titled “Message keys”Errors: PLAYER-ONLY, NO-PERMISSION, INVALID-PLAYER, UNKNOWN-PLAYER, INVALID-NUMBER,
INVALID-CRATE, INSUFFICIENT-KEYS, PROFILE-LOAD-FAILED, AMOUNT-TOO-LARGE.
Crates: KEYS-RECEIVED, CRATE-PLACED, CRATE-BROKEN, CRATE-OPENED, PRINT-REWARD.
Lootboxes: LOOTBOX-OPENED, PRINT-JACKPOT, LOOTBOX-RECEIVED, INVALID-LOOTBOX,
LOOTBOX-UNAVAILABLE, LOOTBOX-BUSY, LOOTBOX-TOO-CLOSE.
Admin: KEYS-CHECK, CHECK-LINE, GAVE-KEYS, GAVE-KEYS-ALL, REMOVED-KEYS, GAVE-LOOTBOXES,
RELOAD, CRATES-ADMIN-HELP.
Help: CRATES-HELP.
Editor: EDITOR-PROMPT, EDITOR-CANCELLED, EDITOR-NEEDS-ITEM, EDITOR-INVALID-NAME,
EDITOR-CRATE-EXISTS, EDITOR-CRATE-CREATED, EDITOR-CRATE-DELETED, EDITOR-CRATE-BROKEN,
EDITOR-REWARD-ADDED, EDITOR-REWARD-DELETED, EDITOR-LAST-REWARD, EDITOR-REWARD-EMPTY,
EDITOR-NEEDS-LINES, EDITOR-NO-PREVIEWS.
Tokens per message
Section titled “Tokens per message”| Message | Tokens |
|---|---|
INVALID-PLAYER, UNKNOWN-PLAYER |
{player} |
INVALID-NUMBER |
{input} (what was typed) |
INVALID-CRATE |
{crate} (what was typed) |
KEYS-RECEIVED |
{crate}, {amount} |
CRATE-PLACED, CRATE-BROKEN |
{crate} |
CRATE-OPENED |
{crate}, {amount} (keys opened), {ms} (time taken), {print-rewards} |
PRINT-REWARD |
{reward}, {amount} (times won) |
KEYS-CHECK |
{player}, {keys} |
CHECK-LINE |
{crate}, {amount} |
GAVE-KEYS, REMOVED-KEYS |
{crate}, {amount}, {player} |
GAVE-KEYS-ALL |
{crate}, {amount}, {online} (players who received keys) |
LOOTBOX-OPENED |
{lootbox}, {amount} (rewards given, jackpot included), {print-rewards} |
PRINT-JACKPOT |
{reward} |
LOOTBOX-RECEIVED |
{lootbox}, {amount} |
GAVE-LOOTBOXES |
{lootbox}, {amount}, {player} |
INVALID-LOOTBOX |
{lootbox} (what was typed) |
AMOUNT-TOO-LARGE |
{max} |
RELOAD |
{ms} |
EDITOR-PROMPT |
{value} (the word from Editor-Format.Prompts) |
EDITOR-CRATE-EXISTS, EDITOR-CRATE-CREATED, EDITOR-CRATE-DELETED, EDITOR-CRATE-BROKEN |
{crate} |
EDITOR-REWARD-ADDED |
{reward}, {crate} |
EDITOR-REWARD-DELETED |
{reward} |
A token only resolves in the messages that provide it.
List messages
Section titled “List messages”Two messages are built from other messages, one line per entry:
{print-rewards}inCRATE-OPENEDis replaced by onePRINT-REWARDline per reward won, in crate order. A reward won several times shows once with its count.{print-rewards}inLOOTBOX-OPENEDis onePRINT-REWARDline per reward, followed by onePRINT-JACKPOTline for the jackpot.{keys}inKEYS-CHECKis replaced by oneCHECK-LINEper crate, including crates with0keys.
Put {print-rewards} and {keys} on a line of their own.
PROFILE-LOAD-FAILEDis not a chat message: it is the disconnect screen shown when a player’s keys cannot be loaded at login.INVALID-PLAYERis for commands that need an online player (lootbox).UNKNOWN-PLAYERis forgive,removeandcheck, which work offline, when the name has never joined the server.KEYS-RECEIVEDis only sent to online players.-songiveandgiveallskips it, and-sonlootboxskipsLOOTBOX-RECEIVED.GAVE-KEYSto an offline player is sent once the database has been updated.LOOTBOX-OPENEDships with a title block, disabled, likeCRATE-OPENED.PRINT-REWARDuses the reward’s display name, so colors from itsDisplay-Itemname show in the summary.
