Skip to content

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.


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 statistics

Controls global plugin settings.

FieldTypeDefaultDescription
enabledBooleantrueMaster switch for the entire lootbag system
revealPageEnabledBooleantrueEnable the animated reveal page UI
dropEnabledBooleantrueEnable lootbag drops from mob kills and block breaks
openCooldownMsLong1000Cooldown between lootbag openings in milliseconds
dropMultiplierDouble1.0Global drop chance multiplier (e.g. 2.0 = double drop rates)
{
"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.

FieldTypeDefaultDescription
nameString"Lootbag"Display name
descriptionStringnullDescription text
iconString"Chest_Wood"Item icon ID for display
rarityString"common"Rarity tier: common, uncommon, rare, epic, legendary
itemsLootItem[]nullFixed item list (Type A)
guaranteedItemsLootItem[]nullGuaranteed items for hybrid mode (Type C)
poolPoolItem[]nullRandom selection pool (Type B & C)
pickCountInteger0Number of items to pick from the pool
allowDuplicatesBooleanfalseWhether the same pool item can be picked multiple times

There are three ways to define lootbag contents:

All items are always given. No randomness.

{
"name": "Starter Pack",
"rarity": "common",
"items": [
{ "itemId": "Food_Bread", "amount": 5 },
{ "itemId": "Wood_Plank", "amount": 10 }
]
}

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.

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 }
]
}

Lootbag names and descriptions support localization via i18n keys:

Key PatternFallback
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 }
]
}
}

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. :::

FieldTypeDefaultDescription
lootbagIdStringItem ID of the lootbag to drop (also accepts itemId as alias)
chanceDoubleDrop probability from 0.0 (never) to 1.0 (always). Affected by dropMultiplier.
minAmountInteger1Minimum drop amount
maxAmountInteger1Maximum drop amount
PatternMatches
*All mob/block types
Bear_*All IDs starting with Bear_
Ore_GoldOnly the exact ID Ore_Gold

Multiple patterns can match the same mob or block. All matching entries are evaluated independently.


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_version changes
  • 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>

All configuration files can be reloaded at runtime:

/lbadmin reload

This 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.