Configuration
Lootbag Configuration
Section titled “Lootbag Configuration”The Lootbags plugin uses multiple configuration files in its data folder. All configs follow the file-first pattern with JAR-fallback extraction on first launch.
File Structure
Section titled “File Structure”mods/lootbag/ config.json Main config (global toggles) configs/ lootbags.json Standard lootbag definitions (versioned) drop_tables.json Mob and block drop rules custom/ custom_lootbags.json User overrides (auto-saved from editor) custom_lootbags.json.example Example file for custom definitions localization/ en-US.json English translations de-DE.json German translations data/ players/<uuid>.json Per-player statisticsMain Config (config.json)
Section titled “Main Config (config.json)”Controls global plugin settings.
| Field | Type | Default | Description |
|---|---|---|---|
enabled | Boolean | true | Master switch for the entire lootbag system |
revealPageEnabled | Boolean | true | Enable the animated reveal page UI |
dropEnabled | Boolean | true | Enable lootbag drops from mob kills and block breaks |
openCooldownMs | Long | 1000 | Cooldown between lootbag openings in milliseconds |
dropMultiplier | Double | 1.0 | Global drop chance multiplier (e.g. 2.0 = double drop rates) |
Full Example
Section titled “Full Example”{ "enabled": true, "revealPageEnabled": true, "dropEnabled": true, "openCooldownMs": 1000, "dropMultiplier": 1.0}:::info Drop Multiplier
The dropMultiplier is applied to all mob and block drop chances. Set it to 2.0 for a double-drop event, 0.5 for reduced drops, or 0.0 to temporarily disable all drops without changing individual rules.
:::
Lootbag Definitions (configs/lootbags.json)
Section titled “Lootbag Definitions (configs/lootbags.json)”Defines all lootbag types. Uses a wrapped format with a version field:
{ "configVersion": 1, "lootbags": { "Default_Lootbag": { ... }, "Golden_Lootbag_Legendary": { ... } }}A flat format (without the wrapper) is also supported.
Definition Fields
Section titled “Definition Fields”| Field | Type | Default | Description |
|---|---|---|---|
name | String | "Lootbag" | Display name |
description | String | null | Description text |
icon | String | "Chest_Wood" | Item icon ID for display |
rarity | String | "common" | Rarity tier: common, uncommon, rare, epic, legendary |
items | LootItem[] | null | Fixed item list (Type A) |
guaranteedItems | LootItem[] | null | Guaranteed items for hybrid mode (Type C) |
pool | PoolItem[] | null | Random selection pool (Type B & C) |
pickCount | Integer | 0 | Number of items to pick from the pool |
allowDuplicates | Boolean | false | Whether the same pool item can be picked multiple times |
Loot Types
Section titled “Loot Types”There are three ways to define lootbag contents:
Type A: Fixed Items
Section titled “Type A: Fixed Items”All items are always given. No randomness.
{ "name": "Starter Pack", "rarity": "common", "items": [ { "itemId": "Food_Bread", "amount": 5 }, { "itemId": "Wood_Plank", "amount": 10 } ]}Type B: Random Pool
Section titled “Type B: Random Pool”Items are randomly selected from a weighted pool.
{ "name": "Mystery Box", "rarity": "rare", "pickCount": 3, "allowDuplicates": false, "pool": [ { "itemId": "Gem_Diamond", "amount": 1, "weight": 5 }, { "itemId": "Gem_Emerald", "amount": 2, "weight": 10 }, { "itemId": "Ingot_Gold", "amount": 5, "weight": 20 }, { "itemId": "Ingot_Iron", "amount": 10, "weight": 30 } ]}The weight field determines relative probability. Higher weight = higher chance. In this example, Iron Ingot has a 30/65 (~46%) chance of being picked first.
Type C: Hybrid
Section titled “Type C: Hybrid”Guaranteed items plus random picks from a pool.
{ "name": "Golden Lootbag", "rarity": "epic", "guaranteedItems": [ { "itemId": "Ingot_Gold", "amount": 10 }, { "itemId": "Nugget_Gold", "amount": 5 } ], "pickCount": 3, "allowDuplicates": false, "pool": [ { "itemId": "Gem_Diamond", "amount": 1, "weight": 5 }, { "itemId": "Gem_Emerald", "amount": 2, "weight": 15 }, { "itemId": "Gem_Ruby", "amount": 1, "weight": 10 }, { "itemId": "Ancient_Coin", "amount": 1, "weight": 3 } ]}I18n Keys
Section titled “I18n Keys”Lootbag names and descriptions support localization via i18n keys:
| Key Pattern | Fallback |
|---|---|
lootbag.name.<id> | name field from JSON |
lootbag.desc.<id> | description field from JSON |
lootbag.rarity.<rarity> | Rarity string |
Custom Lootbags (custom/custom_lootbags.json)
Section titled “Custom Lootbags (custom/custom_lootbags.json)”Add your own lootbag definitions without modifying the standard file. Custom definitions are loaded after standard ones and can override existing IDs.
This file is auto-saved when using the admin panel editor or the /lbadmin edit command. It is never overwritten by plugin updates.
{ "MyServer_VIP_Lootbag": { "name": "VIP Lootbag", "rarity": "legendary", "guaranteedItems": [ { "itemId": "Gem_Diamond", "amount": 5 } ], "pickCount": 2, "pool": [ { "itemId": "Rare_Artifact", "amount": 1, "weight": 10 }, { "itemId": "Enchanted_Book", "amount": 1, "weight": 20 } ] }}Drop Tables (configs/drop_tables.json)
Section titled “Drop Tables (configs/drop_tables.json)”Configures which lootbags drop from mob kills and block breaks.
{ "mobDrops": { "*": [ { "lootbagId": "Default_Lootbag", "chance": 0.02 } ], "Bear_*": [ { "lootbagId": "Bone_Lootbag", "chance": 0.05 } ], "Trork_*": [ { "lootbagId": "Crimson_Lootbag_Common", "chance": 0.01 } ] }, "blockDrops": { "Ore_*": [ { "lootbagId": "Copper_Lootbag", "chance": 0.03 } ], "Ore_Gold*": [ { "lootbagId": "Golden_Lootbag_Common", "chance": 0.05 } ] }}:::note Mob Patterns
Mob drop patterns match against the NPC’s role name (e.g. Bear_Grizzly, Trork_Warrior), not the internal type ID.
:::
Drop Entry Fields
Section titled “Drop Entry Fields”| Field | Type | Default | Description |
|---|---|---|---|
lootbagId | String | — | Item ID of the lootbag to drop (also accepts itemId as alias) |
chance | Double | — | Drop probability from 0.0 (never) to 1.0 (always). Affected by dropMultiplier. |
minAmount | Integer | 1 | Minimum drop amount |
maxAmount | Integer | 1 | Maximum drop amount |
Wildcard Patterns
Section titled “Wildcard Patterns”| Pattern | Matches |
|---|---|
* | All mob/block types |
Bear_* | All IDs starting with Bear_ |
Ore_Gold | Only the exact ID Ore_Gold |
Multiple patterns can match the same mob or block. All matching entries are evaluated independently.
Localization (localization/*.json)
Section titled “Localization (localization/*.json)”Language files follow the format <code>.json (e.g. en-US.json, de-DE.json). The plugin ships with English and German.
- Files are extracted on first launch and updated when the
_localization_versionchanges - Additional language files can be placed in the
localization/folder - Language is auto-detected from the player’s client, or set manually via
/lbadmin lang <code>
Hot Reload
Section titled “Hot Reload”All configuration files can be reloaded at runtime:
/lbadmin reloadThis reloads lootbag definitions (standard + custom), drop tables, and localization files. The main config.json toggles can also be changed via the admin panel Settings tab.