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
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 (never overwritten)
custom_lootbags.json.example Example file for custom definitions
Main Config (config.json)
Controls global plugin toggles.
enabled
| Type | Default |
|---|---|
| Boolean | true |
Master switch for the entire lootbag system. When false, lootbags cannot be opened and drops do not occur.
revealPageEnabled
| Type | Default |
|---|---|
| Boolean | true |
Enable the animated reveal page UI when players open lootbags. When false, all players get direct mode (items go straight to inventory with chat summary) regardless of their personal setting.
dropEnabled
| Type | Default |
|---|---|
| Boolean | true |
Enable lootbag drops from mob kills and block breaks. When false, no drops occur but existing lootbag items can still be opened.
Full Example
{
"enabled": true,
"revealPageEnabled": true,
"dropEnabled": true
}
Lootbag Definitions (configs/lootbags.json)
Defines all lootbag types. Uses a wrapped format with a version field:
{
"configVersion": 1,
"lootbags": {
"Default_Common": { ... },
"Default_Uncommon": { ... },
"Golden_Legendary": { ... }
}
}
A flat format (without the wrapper) is also supported.
Definition Fields
Each lootbag definition supports the following 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
There are three ways to define lootbag contents:
Type A: Fixed Items
All items are always given. No randomness.
{
"name": "Starter Pack",
"rarity": "common",
"items": [
{ "itemId": "Bread", "amount": 5 },
{ "itemId": "Wood_Plank", "amount": 10 }
]
}
Type B: Random Pool
Items are randomly selected from a weighted pool.
{
"name": "Mystery Box",
"rarity": "rare",
"pickCount": 3,
"allowDuplicates": false,
"pool": [
{ "itemId": "Diamond", "amount": 1, "weight": 5 },
{ "itemId": "Emerald", "amount": 2, "weight": 10 },
{ "itemId": "Ruby", "amount": 1, "weight": 8 },
{ "itemId": "Gold_Ingot", "amount": 5, "weight": 20 },
{ "itemId": "Iron_Ingot", "amount": 10, "weight": 30 }
]
}
The weight field determines relative probability. In this example, Iron Ingot has a 30/73 (~41%) chance of being picked first.
Type C: Hybrid
Guaranteed items plus random picks from a pool.
{
"name": "Golden Lootbag",
"rarity": "epic",
"guaranteedItems": [
{ "itemId": "Gold_Ingot", "amount": 10 },
{ "itemId": "Gold_Nugget", "amount": 5 }
],
"pickCount": 3,
"allowDuplicates": false,
"pool": [
{ "itemId": "Diamond", "amount": 1, "weight": 5 },
{ "itemId": "Emerald", "amount": 2, "weight": 15 },
{ "itemId": "Ruby", "amount": 1, "weight": 10 },
{ "itemId": "Ancient_Coin", "amount": 1, "weight": 3 }
]
}
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)
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 never overwritten by the plugin, making it safe for server-specific customizations.
{
"MyServer_VIP_Lootbag": {
"name": "VIP Lootbag",
"rarity": "legendary",
"guaranteedItems": [
{ "itemId": "Diamond", "amount": 5 }
],
"pickCount": 2,
"pool": [
{ "itemId": "Netherite_Ingot", "amount": 1, "weight": 10 },
{ "itemId": "Enchanted_Book", "amount": 1, "weight": 20 }
]
}
}
Drop Tables (configs/drop_tables.json)
Configures which lootbags drop from mob kills and block breaks.
{
"mobDrops": {
"Zombie_*": [
{ "lootbagId": "Bone_Common", "chance": 0.05, "minAmount": 1, "maxAmount": 1 }
],
"Dragon_Boss": [
{ "lootbagId": "Celestial_Legendary", "chance": 1.0, "minAmount": 1, "maxAmount": 1 }
]
},
"blockDrops": {
"Ore_*": [
{ "lootbagId": "Copper_Common", "chance": 0.02, "minAmount": 1, "maxAmount": 1 }
]
}
}
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) |
minAmount | Integer | 1 | Minimum drop amount |
maxAmount | Integer | 1 | Maximum drop amount |
Wildcard Patterns
Drop table keys support wildcard matching:
| Pattern | Matches |
|---|---|
* | All mob/block types |
Zombie_* | All IDs starting with Zombie_ |
Ore_Gold | Only the exact ID Ore_Gold |
Multiple patterns can match the same mob or block. All matching entries are evaluated independently.
Hot Reload
All configuration files can be reloaded at runtime:
/lbadmin reload
This reloads lootbag definitions (standard + custom) and drop tables. The main config.json toggles can be changed via the admin panel Settings tab.