Skip to content

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.

Messages:
KEYS-RECEIVED:
Message:
Enabled: true
Value:
- '&5[&d&lCrates&5] &7You received &f{amount}x {crate} &7crate key(s).'
  • Enabled: false silences a message entirely.
  • Value is 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.

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}'
  • Title is the large center line, Sub-Title the smaller line beneath it. Either can be ''.
  • Fade-In, Stay and Fade-Out are in ticks and default to 10, 60 and 10.
  • Action-Bar shows 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.

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.

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.

Two messages are built from other messages, one line per entry:

  • {print-rewards} in CRATE-OPENED is replaced by one PRINT-REWARD line per reward won, in crate order. A reward won several times shows once with its count.
  • {print-rewards} in LOOTBOX-OPENED is one PRINT-REWARD line per reward, followed by one PRINT-JACKPOT line for the jackpot.
  • {keys} in KEYS-CHECK is replaced by one CHECK-LINE per crate, including crates with 0 keys.

Put {print-rewards} and {keys} on a line of their own.

  • PROFILE-LOAD-FAILED is not a chat message: it is the disconnect screen shown when a player’s keys cannot be loaded at login.
  • INVALID-PLAYER is for commands that need an online player (lootbox). UNKNOWN-PLAYER is for give, remove and check, which work offline, when the name has never joined the server.
  • KEYS-RECEIVED is only sent to online players. -s on give and giveall skips it, and -s on lootbox skips LOOTBOX-RECEIVED.
  • GAVE-KEYS to an offline player is sent once the database has been updated.
  • LOOTBOX-OPENED ships with a title block, disabled, like CRATE-OPENED.
  • PRINT-REWARD uses the reward’s display name, so colors from its Display-Item name show in the summary.