Skip to content

config.yml

Global settings - storage, number format, save interval, giveall per IP, knockback, preview filter lore, editor words and menu sounds.

Global settings. After editing, run /cratesadmin reload. Crate-specific settings live in each crate file, not here.

Settings:
Storage:
Type: SQLITE
Host: "127.0.0.1"
Port: 3306
Database: "minecraft"
Username: "root"
Password: ""
Save-Interval: 60
GiveAll-One-Per-IP: true
Knockback-Keyless-Players: true
Number-Format:
Default: ABBREVIATED
Separated:
Grouping-Separator: ","
Decimal-Separator: "."
Decimals: 2
Abbreviated:
Thousands: "K"
Millions: "M"
Billions: "B"
Trillions: "T"
# ... up to Centillions: "CT"
Key Default Description
Storage SQLite Where key balances, crate blocks and animation toggles are stored. See Storage.
Number-Format abbreviated How key balances and amounts are shown to players and admins. See Number-Format.
Save-Interval 60 Seconds between write-behind flushes of key balances to the database. Spent keys are always saved immediately, and balances are also saved on quit and shutdown. 0 or lower turns the periodic flush off.
GiveAll-One-Per-IP true /cratesadmin giveall gives keys to only one player per IP address, so alt accounts on the same connection do not get extra keys.
Knockback-Keyless-Players true Pushes a player back when they right-click a crate block without a key.
Key Default Description
Type SQLITE SQLITE (a local file at data/data.db) or MYSQL.
Host 127.0.0.1 MySQL host.
Port 3306 MySQL port.
Database minecraft MySQL database (schema) name.
Username root MySQL user.
Password "" MySQL password.
Properties none Optional section of extra MySQL connection properties, for example useSSL: "false".

Host through Properties are ignored with SQLite. The tables are created automatically. Changing storage needs a full restart.

Every key balance and amount a player or admin sees goes through this block: {keys} in menus, crate icons and holograms, {amount} in messages, and the %optimalcrates_keys_formatted_<crate>% placeholder.

Key Default Description
Default ABBREVIATED ABBREVIATED prints 12.5K. SEPARATED prints 12,500.
Separated.Grouping-Separator , Thousands separator. Exactly one character.
Separated.Decimal-Separator . Decimal point used in abbreviated values. Exactly one character.
Separated.Decimals 2 Maximum decimals in an abbreviated value (0 to 8), rounded down. Keys are whole numbers, so separated values never show decimals.
Abbreviated.<Scale> K, M, B, T, Qa, … The suffix for each scale, from Thousands up to Centillions. The list must start at Thousands and be contiguous; you can stop early.

Lore lines appended to every reward icon in a ROLL crate’s preview, showing whether the player has filtered that reward out. Clicking a reward in the preview toggles it. PICK crates do not use these lines; their reward icons show exactly what the crate file writes.

Filter-Formats:
Enabled-Lore:
- ""
- "&a&lINCLUDED"
- "&e➥ Click to filter this reward out!"
Disabled-Lore:
- ""
- "&c&lFILTERED"
- "&e➥ Click to filter this reward in!"
Key Shown when
Enabled-Lore The reward is included (the default).
Disabled-Lore The player filtered the reward out. Filtered rewards are still rolled, but not given.

Set a list to [] to append nothing.

Words used by the In-Game Editor that are shared by several editor menus or sent in chat. Every key is required.

Editor-Format:
None: "none"
Modes:
Roll: "ROLL"
Pick: "PICK"
Prompts:
Crate-Name: "crate name"
Display-Amount: "display item amount"
Display-Slot: "display slot"
Chance: "chance"
Hologram-Height: "hologram height"
Update-Interval: "update interval"
Particle-Interval: "particle interval"
Particle: "particle"
Particle-Color: "particle color"
Line-Labels:
Hologram-Line: "Line"
Reward-Action: "Action"
Key Description
None What {animation} and {preview-menu} show in the editor when nothing is set.
Modes.Roll, Modes.Pick The names shown by {mode} and {next-mode}.
Prompts.* The {value} of the EDITOR-PROMPT message for each chat prompt (“Type the new crate name in chat”).
Line-Labels.Hologram-Line The {label} of the line editor when editing hologram lines.
Line-Labels.Reward-Action The {label} of the line editor when editing reward actions.

Named sounds in "NAME;volume;pitch" form. Names are XSound names, which stay stable across Minecraft versions. Set a key to "" to silence it.

Inventories-Sounds:
"CRATE-MENU-OPEN": "ENTITY_BAT_TAKEOFF;1;0.5"
"OPEN-MENU-OPEN": "ENTITY_BAT_TAKEOFF;1;0.5"
"PREVIEW-MENU-OPEN": "ENTITY_BAT_TAKEOFF;1;0.5"
"ANIMATIONS-TOGGLE": "UI_BUTTON_CLICK;1;1"
"ITEM-FILTER": "UI_BUTTON_CLICK;1;1"
"REWARD-PICKED": "ENTITY_PLAYER_LEVELUP;1;1.5"
"PAGE-CHANGED": "ENTITY_CHICKEN_EGG;1;1"
"NO-PAGE-FOUND": "BLOCK_NOTE_BLOCK_PLING;1;0.5"
"DENIED": "ENTITY_VILLAGER_NO;1;0.5"
Key Played when
CRATE-MENU-OPEN /crates opens the crates menu, or the editor is opened.
OPEN-MENU-OPEN The redeem menu (open one / open all) opens.
PREVIEW-MENU-OPEN A preview (or a PICK crate’s picker) opens.
ANIMATIONS-TOGGLE The animations toggle is clicked. Also played on every change made in the editor.
ITEM-FILTER A reward is filtered in or out in a preview.
REWARD-PICKED A reward is picked in a PICK crate.
PAGE-CHANGED A paged menu turns the page, or a reward or item is moved in the editor.
NO-PAGE-FOUND A page turn fails (already on the first or last page).
DENIED A player tries to open a crate without a key (menu, picker or crate block). Called NOT-ENOUGH-KEYS before, which is renamed automatically.

Animation sounds are not here; each animation file has its own Sounds block.