13 releases, newest first.
config.yml effects.* (normal-roll, normal-complete, super-roll, super-complete) and in animations.yml (orbit and grid scenes) now accepts a resource pack id written with its namespace, for example okimc:roll or okimc:fanfare 1.0 1.0.hand at the key material prompt to copy the look of the item in your main hand: material, custom model data and, for a player head, its texture. The key's name and lore still come from the lootbox.key-item.head-texture in lootbox files (base64 value or skin URL) for a textured PLAYER_HEAD key. Textured keys keep stacking.messages.editor: hand-word, prompt-material-hand, material-hand-empty, material-hand-no-texture, material-hand-updated. They merge in automatically; translated lang files need them added by hand.grid (opening.animation: grid, or cycle it in the editor). A wall of key blocks pops up in front of the player as a square grid; rows hold ceil(sqrt(reward-count)) blocks and the last, incomplete row is centred.
grid: section of animations.yml, which is auto-merged on boot.grid.auto-reveal-ticks (default off) opens the next block by itself after idle time. It is useful with Bedrock players, who cannot see or click the scene.status.animation-grid (auto-merged). Servers with a translated lang file should translate it.animations.yml defaults for the orbit rise: rise.height 1.7, rise.rotations 1, rise.particle "SOUL_FIRE_FLAME 1 0.1 0", rise.particle-strands 2, rise.particle-radius 0.6. Existing files keep their own values.orbit): each reward now leaves the block along a parabola to its orbit spot. New orbit.emerge.arc-height sets how high it goes (blocks above the higher end, 0 = straight line); orbit.emerge.travel-ticks now defaults to 16.animations.yml defaults: rise.height 1.5, rise.rotations 3, emerge.interval-ticks 6, ring.radius 2, shake.duration-ticks 50. Existing files keep their own values.orbit): the block, the orbiting rewards and the super reward now face the player (they showed their back). New orbit.facing-offset-degrees for resource-pack models authored facing another way.<glyph:id> and glyph placeholders) instead of the raw tag. They are server text displays hidden from every other player and never saved.orbit.rise.particle-strands, orbit.rise.particle-radius).orbit.collect.vanish-ticks, orbit.collect.particle) instead of flying to the player. orbit.collect.travel-ticks is no longer used.reward-count (1 to 18, default 9) sets how many normal rewards one opening rolls. opening.yml ships a chest layout for every count (normal-chest.layouts); a server that customized normal-chest.slots keeps its own grid for that many rewards. config.yml opening.max-reward-count caps what the editor accepts. Existing lootboxes keep 9 until you change them.animation (opening.mode: menu | animation, editable in the lootbox editor): an in-world scene that only the opener sees, built from packet-only display entities (no real entity is ever created). The orbit scene: the key rises as a block, the rewards orbit it and all settle on what you won at once with their names floating above, the block shakes and bursts with a firework, the super reward appears with a title, and everything flies to you. Every timing, size, text, sound, particle and the firework are tunable in the new animations.yml.orbit.spawn.no-space-action).messages_en.yml); translate them by hand in custom language files.An item reward stores a byte-exact snapshot of the item it was captured from, which is what lets a lootbox hand out another plugin's item at all. That snapshot is frozen: when the plugin that mints the item later changes how it renders the name or the lore, the stored copy keeps looking identical but its component tree differs, and vanilla refuses to merge the two. The symptom is "the item from the lootbox does not stack with the real one".
/lootbox audit (lootboxes.admin.audit) lists every reward item stored in more than one
non-stacking variant, with how many rewards carry each variant and where they live. Stacking is
decided with the server's own merge test, so a difference the game ignores is never reported./lootbox sync (lootboxes.admin.sync) takes the item in your main hand and refreshes
every reward meant to be that item but no longer stacking with it, across every lootbox at
once. Each reward keeps its weight, delivered amount, delivery method, command template and
enabled state. Rewards that already stack are untouched, so running it twice does nothing.display-item: reward rebuilds the item
from yml fields and drops the whole PDC) is matched by material plus name and regains the tag
on sync. The reverse never happens: a correctly tagged reward is never replaced by an untagged
lookalike.audit.max-items and audit.max-variants-per-item in config.yml, and the
messages.audit.* / messages.sync.* language keys.example.yml and the README now spell out display-item: vs nbt: for custom items, and that
an item unique by construction (a player head with a random profile id) can never stack from a
snapshot: use method: COMMAND so its owning plugin mints it on win.key-items.stackable: false keeps the old per-grant unique behavior.fast-open.max-stack-amount (default 1, 0 = unlimited) denies sneak + right-click on a bigger stack before the key is consumed, with the new messages.errors.fast-open-stack message. Split the stack or open it without sneaking./lootbox no longer requires lootboxes.admin; a helper holding only lootboxes.admin.give can run /lootbox give, and the generated help lists only what the sender may run.AIR and block-only materials are rejected as key material in the editor prompt, the store and the file parser (an AIR key hid the editor's own buttons and spammed SEVERE logs).?? glyphs).IncompatibleClassChangeError on every Paper 1.20.x server when opening a lootbox (key consumed, session stuck) - all InventoryView usage replaced with ABI-safe calls; verified clean at the bytecode level.DUST, BLOCK, ...) in effects.complete-particle are rejected safely instead of throwing inside the animation.[center]) with server-context PlaceholderAPI.editor.delete-confirm-seconds), chat prompts expire (editor.prompt-timeout-seconds), reward odds display matches the real roll, list-overflow notices, rename warns about circulating keys.Configurable lootbox system for Paper 1.20.x/1.21.x, built on SnLib.
Admins define lootboxes as YAML files (weighted normal rewards plus one super reward per opening); players receive physical key items and right-click them to open an animated chest-grid GUI. Rolls are decided and reserved the moment a chest is clicked, and every close path (Esc, logout, timeout, restart) completes the box, so reserved rewards are never lost.
Features
%lootboxes_*%).Install
SnLib.jar goes in plugins/ (SnLib 1.28.0 or newer) alongside SnLootBoxes-2.0.0.jar.config.yml, lang/, guis/, opening.yml and lootboxes/ files on first boot.Requires Java 21+ and Paper 1.20.4+.