Configuration
On this page(5)
SnLootBoxes ships with the following YAML files. New keys are auto-merged on boot; your edits and comments are preserved.
The lootboxes/ folder is the exception: it is yours. The plugin never merges or rewrites your lootbox files.
config.yml
# ============================================================
# SnLootBoxes - configuration
# Managed by SnLib: new keys are auto-merged on boot; your values and
# comments are preserved. Do NOT add a config-version key (retired).
# Set update-configs: false to freeze this file (SnLib only warns about
# missing keys instead of inserting them).
# Sections marked "# sn:extensible" are yours: entries you delete there
# stay deleted.
# ============================================================
# Active language code; loads lang/messages_<code>.yml (falls back to en).
lang: en
# Master switch of the SnLib auto-updater for this plugin's managed files.
update-configs: true
# Runtime debug output (also toggleable live via /lootbox debug).
debug:
# Master toggle of the debug output.
enabled: false
# Verbosity threshold: OFF, INFO, DEBUG or TRACE.
level: DEBUG
# Category filter; an empty list lets every category through.
categories: []
# ------------------------------------------------------------
# Main command.
# ------------------------------------------------------------
command:
# Aliases of /lootbox. Re-read on /lootbox reload.
aliases: []
# ------------------------------------------------------------
# Key items. How generated keys behave in inventories.
# Pick an INERT key material (TRIPWIRE_HOOK, ENDER_CHEST, NETHER_STAR...).
# The plugin blocks the common vanilla consumption vectors (placing/using,
# entity interaction, crafting, furnace, dispenser) - a key in hand also
# blocks trading and mounting until moved off that slot - but exotic
# consumers of edible/smeltable/ammo materials cannot all be guarded.
# ------------------------------------------------------------
key-items:
# true -> keys of the same lootbox stack up to the vanilla max. Keys a
# player already holds are re-rendered from the current lootbox
# definition on join and before every grant, so keys given before
# a reward edit (or while this was false) stack with new ones.
# false -> keys from DIFFERENT grants never stack: each give/giveall/editor
# grant carries its own unique tag. The keys of one grant still
# stack with each other.
stackable: true
# ------------------------------------------------------------
# Display-name template. Renders the key-item name for every lootbox.
# Each lootbox's raw display-name is injected into {name} as a 3-stop
# hex gradient (hex-1 -> hex-2 -> hex-3).
# Placeholders: {hex-1} {hex-2} {hex-3} {bullet} {name}
# ------------------------------------------------------------
display-name:
format-template: "&{hex-1}&l{bullet}&{hex-2}&l{bullet}&f&l{bullet} {name} &f&l&{hex-2}&l{bullet}&{hex-1}&l{bullet}"
# ------------------------------------------------------------
# Auto-lore. When enabled, the key-item lore in each lootboxes/*.yml is
# replaced by the template below.
# key-item-lore placeholders : {display_name} {normal_rewards}
# {super_rewards} {hex-1/2/3} {bullet}
# *-line-format placeholders : {amount} {displayname} {bullet} {hex-1/2/3}
# NOTE: a line containing {normal_rewards}/{super_rewards} is REPLACED by one
# formatted line per reward, so put indentation inside the *-line-format.
# ------------------------------------------------------------
auto-lore:
enabled: true
normal-line-format: "&8 {bullet} &fx{amount} &7{displayname}"
super-line-format: "&{hex-2} {bullet} &fx{amount} &7{displayname}"
key-item-lore:
- "&7Open &r{display_name}&7 for a chance at:"
- ""
- "₢f2&lNormal Rewards"
- "{normal_rewards}"
- ""
- "&#FFD700&lSuper Rewards"
- "{super_rewards}"
- ""
- "&8> Right-click to open"
# ------------------------------------------------------------
# Opening. Per-lootbox settings live in each lootboxes/<id>.yml
# (reward-count, opening.mode, opening.animation).
# ------------------------------------------------------------
opening:
# Highest reward-count the editor accepts (1 to 18; opening.yml ships a
# chest layout for every count up to 18).
max-reward-count: 18
# ------------------------------------------------------------
# Fast open. Shift + right-click a key to skip the animation (menu or
# in-world) and instantly roll and deliver the full reward set (the
# lootbox's reward-count normal rewards plus the super reward).
# ------------------------------------------------------------
fast-open:
enabled: true
# Largest key stack that can be fast-opened. Sneak + right-click on a
# stack holding more keys than this is denied (the keys are kept): split
# the stack or open it without sneaking. 0 or below removes the limit.
max-stack-amount: 1
# ------------------------------------------------------------
# Session. GUI timeout behaviour.
# ------------------------------------------------------------
session:
# Seconds before an open GUI auto-closes (applies to every lootbox).
# 0 or below disables the timeout: sessions then settle only when the
# player closes the GUI, quits or the server stops.
timeout-seconds: 300
# true -> a timed-out session rolls every missing reward and delivers them.
# false -> only already-rolled rewards are delivered, then the GUI closes.
auto-complete-on-timeout: true
# ------------------------------------------------------------
# Editor. Chat-prompt behaviour of /lootbox editor.
# ------------------------------------------------------------
editor:
# Seconds before an unanswered chat prompt expires; after that the next
# chat message goes to normal chat again. 0 or below never expires.
prompt-timeout-seconds: 60
# Window in which a shift-click confirms an armed delete (any first click
# arms it). Floored at 1: the two-step confirm cannot be disabled.
delete-confirm-seconds: 10
# ------------------------------------------------------------
# Reward item audit (/lootbox audit). A reward stores a byte-exact
# snapshot of the item it was captured from, so when the plugin that
# mints that item later changes its name or lore rendering, old
# snapshots stop stacking with freshly obtained copies while still
# looking identical. The audit finds them; /lootbox sync (with the
# fresh item in hand) refreshes every copy across every lootbox.
# These two values only cap the chat output. 0 = no limit.
# ------------------------------------------------------------
audit:
max-items: 15
max-variants-per-item: 4
# ------------------------------------------------------------
# Delivery. Caps how many accounts sharing one IP receive keys from
# /lootbox giveall:
# 0 -> no limit; every online player receives a key.
# N -> at most N accounts per IP. When an IP has more than N accounts
# online, the N with the highest playtime win the keys (playtime is
# read live from the vanilla stat; this plugin never stores it).
# ------------------------------------------------------------
delivery:
max-accounts-per-ip: 0
# ------------------------------------------------------------
# Roll animation (ticks; 20 ticks = 1 second).
# ------------------------------------------------------------
roll-settings:
normal-duration-ticks: 60
normal-interval-ticks: 3
super-duration-ticks: 80
super-interval-ticks: 3
final-visual-delay-ticks: 20
# ------------------------------------------------------------
# Access. Where lootboxes may be opened.
# Empty lists = no restriction. allowed-regions requires WorldGuard.
# ------------------------------------------------------------
access:
allowed-worlds: []
allowed-regions: []
# ------------------------------------------------------------
# Effects. Sounds and particles of the opening animation.
# Sound spec: "SOUND_ID [volume] [pitch]"; "none" disables one. A resource
# pack sound is written with its namespace ("okimc:roll 1.0 1.0"); a bare
# id the server does not know is a typo and is disabled with a warning.
# complete-particle: particles that need extra spawn data (DUST, BLOCK,
# ITEM, ...) are not supported and disable the burst; "none" disables it.
# complete-particle-count is capped at 1000 (a huge count is one packet
# that can freeze every client in view distance).
# ------------------------------------------------------------
effects:
normal-roll-sound: "BLOCK_NOTE_BLOCK_HAT"
normal-complete-sound: "ENTITY_EXPERIENCE_ORB_PICKUP"
super-roll-sound: "BLOCK_NOTE_BLOCK_BELL"
super-complete-sound: "UI_TOAST_CHALLENGE_COMPLETE"
complete-particle: "HAPPY_VILLAGER"
complete-particle-count: 40
# ------------------------------------------------------------
# Announce. Message sent when a player finishes opening a lootbox.
# message placeholders : {player} {display_name} {normal_rewards}
# {super_reward} {hex-1/2/3} {bullet}
# *-line-format placeholders: {amount} {displayname} {bullet} {hex-1/2/3}
# NOTE: a line containing {normal_rewards} is REPLACED by one formatted line
# per reward - any other text on that line is discarded, so keep it alone.
# mode: "broadcast" (everyone) | "player" (opener only) | "none" (disable)
# A lootbox with announce-personal: true always announces to the opener only.
# NOTE: both modes render the full text pipeline (colors, hex, MiniMessage,
# [center]). The difference is PAPI context: "player" resolves placeholders
# against the opener, broadcast resolves them in SERVER context - global
# placeholders work, per-viewer ones cannot (there is no single viewer).
# ------------------------------------------------------------
announce:
enabled: true
mode: "broadcast"
normal-line-format: "&8 {bullet} &fx{amount} &7{displayname}"
super-line-format: "&{hex-2} {bullet} &fx{amount} &7{displayname}"
message:
- "&8&m "
- "&f{player} &7opened &r{display_name}&7!"
- ""
- "₢f2&lNormal Rewards"
- "{normal_rewards}"
- ""
- "&#FFD700&lSuper Reward"
- "{super_reward}"
- "&8&m "opening.yml
# ============================================================
# SnLootBoxes - opening GUI layout
# Shown when a player right-clicks a lootbox key.
# Managed by SnLib: new keys are auto-merged on boot; your values and
# comments are preserved.
#
# title: {lootbox} is the rendered lootbox name; PAPI placeholders
# resolve against the opener.
# size: must be a multiple of 9 between 9 and 54 (invalid -> 54).
# How many chests one opening shows is the lootbox's reward-count
# (lootboxes/<id>.yml). normal-chest.layouts maps every count to its
# slots; a count with no valid layout uses the first slots of
# normal-chest.slots. LIST ORDER is the opening order of the grid.
# Slots outside the GUI size and the super-chest slot are ignored.
# Item entries follow the SnLib item spec: material, display-name,
# lore, glow, custom-model-data (plus heads, colors, enchantments...).
# ============================================================
title: "{lootbox}"
size: 54
# Decorative background; fills every slot no chest occupies.
filler:
material: BLACK_STAINED_GLASS_PANE
display-name: " "
lore: []
# The openable chest grid.
normal-chest:
# Fallback grid: a reward-count without a valid entry under layouts
# uses the first <count> slots of this list.
slots: [12, 13, 14, 21, 22, 23, 30, 31, 32]
# One grid per reward-count (1 to 18). An entry must list exactly that
# many usable slots, otherwise it is ignored with a console warning.
layouts:
"1": [22]
"2": [21, 23]
"3": [21, 22, 23]
"4": [12, 14, 30, 32]
"5": [12, 14, 22, 30, 32]
"6": [12, 13, 14, 30, 31, 32]
"7": [12, 13, 14, 22, 30, 31, 32]
"8": [12, 13, 14, 21, 23, 30, 31, 32]
"9": [12, 13, 14, 21, 22, 23, 30, 31, 32]
"10": [11, 12, 13, 14, 15, 29, 30, 31, 32, 33]
"11": [11, 12, 13, 14, 15, 22, 29, 30, 31, 32, 33]
"12": [11, 12, 13, 14, 15, 21, 23, 29, 30, 31, 32, 33]
"13": [11, 12, 13, 14, 15, 21, 22, 23, 29, 30, 31, 32, 33]
"14": [11, 12, 13, 14, 15, 20, 21, 23, 24, 29, 30, 31, 32, 33]
"15": [11, 12, 13, 14, 15, 20, 21, 22, 23, 24, 29, 30, 31, 32, 33]
"16": [10, 11, 12, 13, 14, 15, 16, 21, 23, 28, 29, 30, 31, 32, 33, 34]
"17": [10, 11, 12, 13, 14, 15, 16, 21, 22, 23, 28, 29, 30, 31, 32, 33, 34]
"18": [10, 11, 12, 13, 14, 15, 16, 20, 21, 23, 24, 28, 29, 30, 31, 32, 33, 34]
material: ENDER_CHEST
display-name: "₢f2&lClick to Open"
lore:
- "&7Reveal a random reward."
- ""
- "&8> Click to roll"
# The super chest: locked until every normal chest is opened.
super-chest:
slot: 49
locked:
material: RED_STAINED_GLASS_PANE
display-name: "&c&lSuper Chest &8(Locked)"
lore:
- "&7Open all chests to unlock."
unlocked:
material: ENDER_CHEST
display-name: "&#FFD700&lSuper Chest"
lore:
- "&eThe big one - click to roll!"
- ""
- "&8> Click to roll"
glow: trueanimations.yml
# ============================================================
# SnLootBoxes - in-world opening animations
# Used by lootboxes with opening.mode: animation (lootboxes/<id>.yml);
# opening.animation picks the scene (orbit or grid).
# Requires the PacketEvents plugin; without it those lootboxes open as
# the chest menu. Only the opener sees the scene: the moving parts are
# packet-only displays, and the floating texts are real text displays
# hidden from every other player and never saved (so resource-pack glyph
# tags in reward names render). The grid's click targets are invisible
# interaction entities, hidden and never saved the same way.
# Bedrock (Geyser) players do not render display entities; they still
# receive every reward (see grid.auto-reveal-ticks).
# Managed by SnLib: new keys are auto-merged on boot; your values and
# comments are preserved. Read on every opening (/lootbox reload applies).
#
# Sound spec : "SOUND_ID [volume] [pitch]" ("none" = silent)
# A resource pack sound is written with its namespace ("okimc:roll").
# Particle spec : "PARTICLE [count] [spread] [speed]" ("none" = off)
# Particles that need extra data (DUST, BLOCK, ITEM...) are not
# supported. Names are Paper particle names (HAPPY_VILLAGER, END_ROD...).
# Text accepts the usual colors (&a, &#RRGGBB, MiniMessage).
# Times are in ticks (20 ticks = 1 second); distances in blocks.
# ============================================================
# Ticks between two animation frames, shared by every scene. The client
# smooths the motion between frames. Kept between 2 and 10.
frame-interval-ticks: 2
# Text displays (reward names, super title): background color as ARGB hex
# (AARRGGBB, "00000000" = no background), drop shadow, and whether the
# text shows through blocks.
text:
background: "40000000"
shadow: true
see-through: false
# ------------------------------------------------------------
# orbit: the key rises as a block, the rewards orbit around it and
# settle, the block shakes and bursts, the super reward appears, and
# everything vanishes in place.
# ------------------------------------------------------------
orbit:
spawn:
# How far in front of the player the scene is placed (feet height,
# centred on the block). When that spot is blocked the plugin tries
# closer, down to 1 block.
distance: 3.0
# Walking farther than this from the scene (or changing world) ends it
# at once and delivers every reward. Raised to distance + 4 when lower.
max-distance: 12.0
# No free spot in front of the player (3 passable blocks high):
# deny -> message, the key is NOT consumed
# menu -> open the chest menu instead
no-space-action: deny
# Extra turn, in degrees, added to every item that faces the player (the
# block, the orbiting rewards, the super reward). 0 shows the front; use
# 180 (or 90) only for a resource-pack model authored facing another way.
facing-offset-degrees: 0
# The key item, shown as a block (a block item renders as a full cube,
# custom-model-data respected).
center:
scale: 1.0
# Pop-in time when the block appears on the ground.
place-ticks: 8
place-sound: "BLOCK_STONE_PLACE 1 0.8"
place-particle: "CLOUD 12 0.3 0.02"
rise:
# Height the block floats up to.
height: 1.7
duration-ticks: 40
# Full turns the block makes while rising.
rotations: 1
sound: "BLOCK_BEACON_ACTIVATE 1 1.4"
# Spiral trail drawn around the block while it rises; it turns with
# the block.
particle: "SOUL_FIRE_FLAME 1 0.1 0"
# Trail strands evenly spaced around the block (0 = no trail).
particle-strands: 2
# Distance of the trail from the block's centre, in blocks (scaled with
# center.scale).
particle-radius: 0.6
emerge:
# Ticks between two rewards leaving the block.
interval-ticks: 6
# Ticks one reward takes to fly from the block to its orbit spot,
# along a parabola.
travel-ticks: 16
# How high the parabola goes: blocks above the higher of its two ends
# (the top of the block and the orbit spot). 0 = straight line.
arc-height: 1.2
# Size of the orbiting items.
item-scale: 0.6
sound: "ENTITY_ITEM_PICKUP 0.7 1.4"
ring:
# Orbit radius, plus this much per orbiting item.
radius: 2
radius-per-item: 0.06
# Orbit height relative to the floating block.
height: 0.0
spin:
duration-ticks: 80
# Orbit speed in degrees per tick, slowing from start to end.
start-speed: 14.0
end-speed: 1.0
# Ticks between two item swaps of one orbiting item, growing from
# start to end (the items flicker fast, then slow down).
cycle-start-interval-ticks: 2
cycle-end-interval-ticks: 12
sound: "BLOCK_NOTE_BLOCK_HAT 0.5 1.6"
# Every orbiting item stops on its reward at the same time.
lock:
hold-ticks: 30
sound: "ENTITY_PLAYER_LEVELUP 0.8 1.2"
particle: "HAPPY_VILLAGER 4 0.2 0"
name:
# {name} = reward display name, {amount} = delivered amount.
format: "{name} &7x{amount}"
# Height above the item.
offset: 0.45
scale: 0.55
shake:
duration-ticks: 50
# Jitter distance of the block, growing from start to end.
intensity-start: 0.02
intensity-end: 0.14
# Largest wobble angle in degrees, reached at the end.
max-angle: 18.0
particle: "CRIT 3 0.3 0.05"
# Ticks between two shake sounds; the pitch rises from start to end.
sound: "BLOCK_NOTE_BLOCK_BASEDRUM 0.8 1"
sound-interval-ticks: 4
pitch-start: 0.6
pitch-end: 2.0
burst:
sound: "ENTITY_GENERIC_EXPLODE 0.6 1.4"
particle: "CLOUD 30 0.4 0.08"
firework:
enabled: true
# BALL, BALL_LARGE, STAR, BURST or CREEPER.
type: BALL_LARGE
# Hex colors (#RRGGBB).
colors: ["#FFD700", "#FF8C00"]
fade-colors: ["#FFFFFF"]
flicker: true
trail: true
super:
scale: 1.2
# Extra height the super reward floats up to after appearing.
rise: 0.6
grow-ticks: 15
# Slow self-spin in degrees per tick.
spin-speed: 4.0
hold-ticks: 50
sound: "UI_TOAST_CHALLENGE_COMPLETE 1 1"
particle: "END_ROD 30 0.4 0.05"
title:
text: "&6&lSUPER REWARD"
# Height above the super reward.
offset: 1.1
scale: 1.2
name:
format: "{name} &7x{amount}"
offset: 0.75
scale: 0.8
# Every item shrinks away where it stands (with a puff of particles),
# then the rewards are delivered.
collect:
# Ticks the items take to shrink away.
vanish-ticks: 8
particle: "CLOUD 6 0.15 0.02"
sound: "ENTITY_ITEM_PICKUP 1 0.8"
# ------------------------------------------------------------
# grid: an interactive scene. A wall of key blocks pops up in front of
# the player (rows of ceil(sqrt(reward-count)) blocks; the last,
# incomplete row is centred). Clicking a block (either mouse button)
# pushes it back while it shrinks, and the reward grows out from behind
# it, flickering through the pool until it lands on what was won. When
# every block is open the rewards swirl into the centre and become one
# bigger block; clicking it makes it shake, burst with a firework and
# reveal the super reward, then everything vanishes and the rewards are
# delivered. Every reward is decided when the scene starts: walking
# away, logging out, the session timeout or a restart deliver them all.
# ------------------------------------------------------------
grid:
spawn:
# How far in front of the player the wall is placed (feet height,
# centred on the block). Survival players can only click entities up
# to 3 blocks from their eyes: keep this at 2.5 or less so every block
# of the wall stays clickable. Tried closer, down to 1 block, when
# that spot is blocked.
distance: 2.0
# Walking farther than this from the wall (or changing world) ends the
# scene at once and delivers every reward. Raised to distance + 4 when
# lower.
max-distance: 12.0
# No free spot in front of the player (3 passable blocks high):
# deny -> message, the key is NOT consumed
# menu -> open the chest menu instead
no-space-action: deny
# Extra turn, in degrees, added to every block and item of the scene. 0
# shows the front; use 180 (or 90) only for a resource-pack model
# authored facing another way.
facing-offset-degrees: 0
layout:
# Size of every block of the wall (1 = a full block).
cell-scale: 0.8
# Distance between the centres of two neighbouring blocks.
spacing: 0.9
# Height of the wall's centre above the floor.
center-height: 1.5
# The wall pops in, block by block in reading order.
appear:
# Ticks one block takes to grow from nothing.
grow-ticks: 10
# Ticks between two blocks starting to grow (0 = all at once).
stagger-ticks: 2
sound: "BLOCK_BEACON_ACTIVATE 1 1.6"
# Puff on each block as it appears.
particle: "CLOUD 4 0.2 0.02"
# Particles drifting around the wall while it waits for clicks.
ambient:
particle: "PORTAL 8 1.0 0.3"
interval-ticks: 10
# Text floating above the wall until every block is open ("" = none).
hint:
text: "&e&lCLICK THE CHESTS"
# Height above the top row.
offset: 0.3
scale: 0.8
# What a click on a block does.
reveal:
click-sound: "BLOCK_CHEST_OPEN 0.8 1.2"
# How far behind the wall the clicked block retreats while it shrinks.
push-back: 0.6
shrink-ticks: 8
# Ticks the reward takes to grow forward into the block's place.
grow-ticks: 10
# Size of a revealed reward.
item-scale: 0.55
# Ticks the reward flickers through the pool before showing what was
# won (counted from the click).
roll-ticks: 30
# Ticks between two flickers, growing from start to end (fast, then
# slowing down).
cycle-start-interval-ticks: 2
cycle-end-interval-ticks: 8
roll-sound: "BLOCK_NOTE_BLOCK_HAT 0.5 1.6"
settle-sound: "ENTITY_PLAYER_LEVELUP 0.6 1.4"
settle-particle: "HAPPY_VILLAGER 4 0.2 0"
name:
# {name} = reward display name, {amount} = delivered amount.
format: "{name} &7x{amount}"
# Height above the reward.
offset: 0.02
scale: 0.4
# Ticks without a click after which the next block opens by itself (and
# the final block too); 0 = never. Bedrock (Geyser) players see no
# scene and cannot click it: set this (for example 60) on servers with
# Bedrock players, or they wait for the session timeout.
auto-reveal-ticks: 0
# Once every block is open: the rewards swirl into the centre.
gather:
# Pause after the last reward appears.
hold-ticks: 20
duration-ticks: 30
# Turns the rewards make around the centre while they gather (capped
# so the motion stays smooth).
swirl-turns: 1.5
# Size of the rewards when they reach the centre (1 = unchanged).
end-scale: 0.3
particle: "REVERSE_PORTAL 6 0.25 0.02"
sound: "BLOCK_BEACON_POWER_SELECT 0.8 1.4"
# The final block the rewards turn into. Without a super reward (the
# lootbox has none) the gathered rewards just vanish instead.
final:
scale: 1.2
grow-ticks: 20
# Whole turns the block makes while it grows.
rotations: 1
sound: "BLOCK_BEACON_ACTIVATE 1 1.4"
particle: "END_ROD 20 0.4 0.05"
hint:
text: "&6&lCLICK!"
# Height above the final block.
offset: 0.3
scale: 0.8
# Played when the final block is clicked.
click-sound: "BLOCK_CHEST_OPEN 1 0.8"
# After the click: the same finale as the orbit scene.
shake:
duration-ticks: 50
# Jitter distance of the block, growing from start to end.
intensity-start: 0.02
intensity-end: 0.14
# Largest wobble angle in degrees, reached at the end.
max-angle: 18.0
particle: "CRIT 3 0.3 0.05"
# Ticks between two shake sounds; the pitch rises from start to end.
sound: "BLOCK_NOTE_BLOCK_BASEDRUM 0.8 1"
sound-interval-ticks: 4
pitch-start: 0.6
pitch-end: 2.0
burst:
sound: "ENTITY_GENERIC_EXPLODE 0.6 1.4"
particle: "CLOUD 30 0.4 0.08"
firework:
enabled: true
# BALL, BALL_LARGE, STAR, BURST or CREEPER.
type: BALL_LARGE
# Hex colors (#RRGGBB).
colors: ["#FFD700", "#FF8C00"]
fade-colors: ["#FFFFFF"]
flicker: true
trail: true
super:
scale: 1.2
# Extra height the super reward floats up to after appearing.
rise: 0.6
grow-ticks: 15
# Slow self-spin in degrees per tick.
spin-speed: 4.0
hold-ticks: 50
sound: "UI_TOAST_CHALLENGE_COMPLETE 1 1"
particle: "END_ROD 30 0.4 0.05"
title:
text: "&6&lSUPER REWARD"
# Height above the super reward.
offset: 1.1
scale: 1.2
name:
format: "{name} &7x{amount}"
offset: 0.75
scale: 0.8
# Everything shrinks away where it stands, then the rewards are
# delivered.
collect:
vanish-ticks: 8
particle: "CLOUD 6 0.15 0.02"
sound: "ENTITY_ITEM_PICKUP 1 0.8"animations.yml is only used by lootboxes with opening.mode: animation, and only while the PacketEvents plugin is installed. The orbit: section tunes the orbit scene and the grid: section the interactive grid scene; opening.animation in a lootbox file picks which one it plays.
lootboxes/example.yml
# ============================================================
# SnLootBoxes - example lootbox
# ------------------------------------------------------------
# This folder is yours: the plugin never merges or rewrites
# your files on update. Copy this file to create a lootbox by
# hand (the file name minus .yml is the lootbox id), or manage
# everything in-game with /lootbox editor.
#
# NOTE: when the in-game editor saves a lootbox it rewrites the
# whole file in its own serialized reward form (see the REWARDS
# banner below), replacing hand-written display-item blocks and
# all comments. A reward the plugin could not read at load time
# (typo'd material, item saved by a newer server) is skipped with a
# console warning; the editor then refuses to save this lootbox
# until the file is fixed and /lootbox reload is run, so a save can
# never delete a reward it did not load.
#
# Rarity colors used below:
# &f Common &a Uncommon &b Rare &5 Epic &6 Legendary
# ============================================================
# Name shown to players. Rendered as a 3-stop hex gradient
# (hex-1 -> hex-2 -> hex-3 below) through config.yml's
# display-name template.
display-name: "Example Crate"
# false = one opening never rolls the same normal reward twice; needs at
# least reward-count enabled normal rewards.
# true = every roll is independent; needs at least 1.
allow-duplicates: false
# How many normal rewards one opening rolls, from 1 to 18 (config.yml
# opening.max-reward-count can lower that cap). The menu lays the chests
# out with opening.yml normal-chest.layouts; the animation puts this many
# items in its ring. Plus the single super reward, always.
reward-count: 9
# true = the opening announcement is shown only to the opener.
# false = it follows the global announce settings in config.yml.
announce-personal: false
# How a key of this lootbox opens.
opening:
# menu = the chest grid GUI of opening.yml.
# animation = an in-world scene only the opener sees (animations.yml).
# Needs the PacketEvents plugin; without it the lootbox
# opens as menu.
mode: menu
# Scene played in animation mode: orbit or grid.
animation: orbit
# The physical key players right-click to open this lootbox.
key-item:
# Item material of the key.
material: TRIPWIRE_HOOK
# Texture of a PLAYER_HEAD key: base64 value or skin URL; ignored on any
# other material. Typing "hand" in the editor's material prompt fills it
# from the head you are holding.
# head-texture: "eyJ0ZXh0dXJlcyI6..."
# Raw key name; the rendered name normally comes from
# display-name above plus the gradient template.
display-name: "Example Crate"
# Key lore; ignored while auto-lore is enabled in config.yml.
# {hex-1} {hex-2} {hex-3} {bullet} are replaced when shown.
lore:
- "&7Right-click to open this crate."
- ""
- "&7Rarity: &6Legendary"
# Kept for the file round-trip only: grants take their stack amount from
# the give/giveall command or the editor, never from this field.
amount: 1
# Custom model data for resource packs; 0 = none.
custom-model-data: 0
# true adds an enchantment glint to the key.
glow: false
# Bullet character used by the gradient template and reward lines.
bullet: "•"
# The three gradient stops of the rendered name (#RRGGBB).
hex-1: "#FFD700"
hex-2: "#FFFFFF"
hex-3: "#FFD700"
# ============================================================
# REWARDS - two pools: "normal" (reward-count rewards per
# opening) and "super" (one big reward after all of them).
#
# Hand-written reward form (used in this file):
# weight relative win chance, any number above 0
# display-item the item shown in the GUI and delivered:
# material (required), display-name, lore,
# amount (stack shown AND delivered),
# custom-model-data
# amount optional, next to weight: overrides
# display-item.amount as the delivered amount
# actions optional, one entry decides delivery:
# "[console] cmd" or "[command] cmd" runs the
# command as console on win ({player} = winner
# name, {amount} = reward amount); with no such
# entry the display item itself is delivered.
# enabled optional, default true. false = the reward
# still shows in previews and key lore but can
# never be won.
#
# Editor-saved reward form (equivalent, written on every editor
# save): weight, nbt (base64 item bytes), amount (delivered
# amount), method (NBT | COMMAND), command-template, enabled.
# An explicit method always wins over actions inference.
#
# display-item vs nbt, and items of OTHER plugins:
# display-item rebuilds the item from the fields above, so it
# keeps only material, name, lore, amount and model data. Any
# other NBT is gone - including the tag by which the owning
# plugin recognizes its own item. Fine for vanilla drops, wrong
# for a custom item.
# nbt stores the exact bytes of a captured item (that is what
# the editor writes when you click an item), so custom items
# work and arrive intact. The snapshot is frozen though: if the
# plugin that mints the item later changes its name or lore
# rendering, the stored copy still LOOKS the same but no longer
# stacks with a freshly obtained one. Run /lootbox audit to find
# those, and /lootbox sync holding a fresh copy to refresh every
# reward of it in one go.
# For an item whose every copy is unique by design (a player
# head with a random profile id), no snapshot can ever stack:
# use a COMMAND reward so the owning plugin mints it on win.
# ============================================================
rewards:
normal:
coal:
# Relative win chance within this pool.
weight: 60.0
display-item:
material: COAL
display-name: "&fCoal"
lore:
- "&7Rarity: &fCommon"
amount: 32
iron:
weight: 50.0
display-item:
material: IRON_INGOT
display-name: "&fIron Ingot"
lore:
- "&7Rarity: &fCommon"
amount: 16
money:
weight: 35.0
display-item:
material: GOLD_NUGGET
display-name: "&6$1,000"
lore:
- "&7Rarity: &aUncommon"
# Delivered as a console command instead of the item above.
actions:
- "[console] eco give {player} 1000"
gold:
weight: 30.0
display-item:
material: GOLD_INGOT
display-name: "&eGold Ingot"
lore:
- "&7Rarity: &aUncommon"
amount: 8
redstone:
weight: 25.0
display-item:
material: REDSTONE
display-name: "&cRedstone Dust"
lore:
- "&7Rarity: &aUncommon"
amount: 24
emerald:
weight: 20.0
display-item:
material: EMERALD
display-name: "&aEmerald"
lore:
- "&7Rarity: &aUncommon"
amount: 5
diamond:
weight: 15.0
display-item:
material: DIAMOND
display-name: "&bDiamond"
lore:
- "&7Rarity: &bRare"
amount: 3
ender-pearl:
weight: 10.0
display-item:
material: ENDER_PEARL
display-name: "&3Ender Pearl"
lore:
- "&7Rarity: &bRare"
amount: 4
netherite:
weight: 5.0
display-item:
material: NETHERITE_SCRAP
display-name: "&5Netherite Scrap"
lore:
- "&7Rarity: &5Epic"
amount: 2
super:
diamond-block:
weight: 40.0
display-item:
material: DIAMOND_BLOCK
display-name: "&bDiamond Block"
lore:
- "&7Rarity: &bRare"
- "&#FFD700Super Reward"
amount: 5
big-money:
weight: 30.0
display-item:
material: GOLD_BLOCK
display-name: "&6$10,000"
lore:
- "&7Rarity: &6Legendary"
- "&#FFD700Super Reward"
actions:
- "[console] eco give {player} 10000"
netherite-sword:
weight: 20.0
display-item:
material: NETHERITE_SWORD
display-name: "&5Netherite Sword"
lore:
- "&7Rarity: &5Epic"
- "&#FFD700Super Reward"
elytra:
weight: 10.0
display-item:
material: ELYTRA
display-name: "&dElytra"
lore:
- "&7Rarity: &5Epic"
- "&#FFD700Super Reward"Other files
lang/messages_en.ymlholds every message the plugin sends; it auto-merges on boot.guis/editor-main.yml,guis/editor-lootbox.yml,guis/editor-items.ymlandguis/editor-reward.ymldefine the editor menus; they auto-merge on boot.