Chest Settings Documentation
This page explains how to use the ChestSettings.yml file for full control over chest loot on your server, for all skill levels.
It covers what each feature does, why you'd use it, YAML basics, all options (old and new), copy-paste examples, common errors, and troubleshooting.
By the end, you'll know how to make any chest you want.
1. What Is ChestSettings.yml?
This file tells the plugin what to put in every chest on your server.
You can:
- Choose what items can appear, and how often.
- Give items custom names and colors.
- Add enchantments with any levels or colors.
- Use normal Minecraft loot tables for vanilla-style loot.
- Mix custom and vanilla loot pools, per biome.
You set everything in this YAML file, if you mess up the YAML, the plugin might not load, so follow the formatting!
Location:
File can be found here:plugins/SkyGrid/SkygridBlocks/ChestSettings.yml
2. How Chests Get Filled (The Basics)
When the plugin wants to fill a chest:
- Find the right config.
- Looks at the biome where the chest is.
- Finds all configs in
ChestSettingswith a matching biome in theirBiomeslist. - Picks one (random if multiple; you can weight them).
- Decide how to fill it.
- If it uses
Items, it's a custom loot chest. - If it uses
LootTables, it's a vanilla loot chest (or a mix).
- If it uses
- Fill the chest.
- For custom loot, each empty slot is filled by picking a random item, using weights.
- Each item's
MaxAmountandMinAmountcontrol the total for that chest. - You can set up per-chest chances (so some items only appear sometimes).
- If using vanilla loot tables, the chest uses Minecraft's normal loot rules for that table.
3. YAML Basics (Don't Skip!)
YAML is super picky!
If you make a mistake (wrong indent, use of tabs, missing quotes), the plugin may not load your config.
- ALWAYS use spaces for indentation. NEVER use tabs.
- Indent everything the same way as the examples.
- Put quotes around anything with a special character (like § or spaces in names).
- Comments start with
#, they are ignored by the plugin. - Lists use dashes:
Example:- APPLE:10:1-3 - STICK:20:2-4 - Use a YAML checker to spot mistakes:
https://www.yamllint.com/
4. Where To Find Item/Biome/Enchantment Names
ALWAYS use exact names as found here:
- Materials (items):
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html - Biomes:
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/block/Biome.html - Enchantments:
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/enchantments/Enchantment.html - LootTables (vanilla):
https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/loot/LootTables.html
Names are in ALL_CAPS, with underscores for spaces.
Examples: DIAMOND_SWORD, DARK_OAK_FOREST, FORTUNE, SIMPLE_DUNGEON
5. Top-Level Option: MaxItemsPerSlot
This goes at the very top of your file.
It controls the most of one item that can go in a single chest slot.
It only works with custom loot (not vanilla loot tables).
Example:
MaxItemsPerSlot: 3
- If you set it to 3, a slot will never have more than 3 of the same item.
- Does nothing if you only use vanilla loot tables.
6. Custom Loot Tables (Custom Items)
You have two ways to write custom loot:
A. Compact Format (Simple, Quick)
Each item is written as a string.
Format:
MATERIAL:weight:maxAmountMATERIAL:weight:minAmount-maxAmount- Or for per-chest odds:
MATERIAL:Xp:minAmount-maxAmount
(add apafter the weight number,Xis percent per chest)
What do the parts mean?
MATERIAL= item name (see links above)weight= how likely the item is compared to other items (bigger = more likely, unless you usepfor chance)maxAmount= max in the chestminAmount= min in the chest (optional; if missing, defaults to 1)- Adding
pafter the number (like2p) switches to "ChancePerChest" mode:- Now, instead of per-slot, the item has a single roll per chest (e.g., 2% chance that chest gets apples at all).
- If it passes, the chest gets a random amount between min and max.
Examples:
ChestSettings:
BasicChest:
Items:
- DIAMOND:10:1-3 # 10 weight, 1-3 diamonds total
- STICK:50:5 # 50 weight, 1-5 sticks total
- APPLE:2p:1-4 # 2% per-chest chance for 1-4 apples
- AIR:100:1 # AIR (filler), makes rare stuff rarer
Biomes: [FOREST, PLAINS]
Why use AIR as filler?
Adding AIR with a high weight makes your rare items even rarer.
If most picks land on AIR, the other stuff will show up less often.
B. Expanded Format (Advanced, All Options)
You can set weights, per-chest chances, custom names, enchantments, level type, and more.
Structure:
Each item gets a block under Items.
You set as many options as you need.
Here are all options, with explanations:
Weight:
How likely this item is per slot, compared to the rest.
Ignored ifChancePerChestis used for this item.ChancePerChest:
Percent chance this item will show up at all in the chest (only checked once per chest, not per slot).
If set, this takes priority overWeight.MinAmount/MaxAmount:
The range for how many can be put in the chest (pick a random number between these each time).CustomName:
Lets you set the display name, with Minecraft color codes. Always put quotes around this value.LevelType:
Sets how enchantment levels show up in the item's lore.Standard: Shows as "lvl_5"Roman: Shows as "V" (default if not set)
Enchantments:
List of enchantments, each with:- The enchantment name (see link above)
Weight: % chance (0-100) the enchant is appliedMinLevel/MaxLevel: The range for the levelLoreColor: The lore line color for this enchant (see table below)
Example (all features):
ChestSettings:
FancyChest:
Items:
- GOLDEN_APPLE:
- Weight: 5
- MinAmount: 1
- MaxAmount: 2
- CustomName: "§6Golden Snack"
- ENCHANTED_BOOK:
- Weight: 2
- Enchantments:
- SHARPNESS:
- Weight: 100
- MinLevel: 3
- MaxLevel: 5
- FORTUNE:
- Weight: 50
- MinLevel: 1
- MaxLevel: 2
- IRON_SWORD:
- ChancePerChest: 3 # Only a 3% chance this chest has a sword!
- MaxAmount: 1
- CustomName: "§fKnight's Blade"
- LevelType: Roman
- Enchantments:
- FIRE_ASPECT:
- Weight: 70
- MinLevel: 1
- MaxLevel: 2
- LoreColor: RED
- BREAD:
- Weight: 30
- MinAmount: 1
- MaxAmount: 5
- AIR:
- Weight: 120
Biomes: [FOREST, PLAINS, LUSH_CAVES]
You can mix compact and expanded items in the same list.
If both Weight and ChancePerChest are set, ChancePerChest takes priority.
7. Vanilla Loot Tables (Minecraft Built-In Loot)
Want to use Minecraft's own loot instead of picking every item yourself?
Just use the LootTables section.
Each entry is a map of the loot table name (from Bukkit's LootTables) to a list with a Weight field.
This lets you randomize between different vanilla loot tables, or mix with custom chests (see next section).
Example:
ChestSettings:
VanillaCaveChest:
LootTables:
- ABANDONED_MINESHAFT:
- Weight: 100
- BASTION_TREASURE:
- Weight: 10
Biomes: [DRIPSTONE_CAVES, DEEP_DARK]
Notes:
MaxItemsPerSlotdoes NOT affect vanilla loot tables.- Use only the enum names from the Bukkit LootTables doc.
8. Mixed Pools (Combining Custom and Vanilla)
You can combine vanilla loot tables and your own custom loot tables in one chest config.
The plugin randomly picks one from the pool, based on weights.
Example:
ChestSettings:
MixedLoot:
LootTables:
- SIMPLE_DUNGEON:
- Weight: 70
- FancyChest: # Refers to custom chest defined elsewhere
- Weight: 30
Biomes: [BIRCH_FOREST]
How it works:
- When a chest is created, it randomly picks one entry from
LootTables(based on weights). - If it picks a vanilla table, it fills the chest using that table.
- If it picks a custom table, it fills using the custom items/settings you defined.
9. More Details & How Stuff Works
A. How Item Selection Works (Weights and ChancePerChest)
- For each empty slot, the plugin rolls to pick an item.
- If you use weights, it picks one by comparing all weights (bigger = more likely).
- If you set
ChancePerChestfor an item, that item is only tried ONCE per chest. If it passes, it gets put in (with random amount in your range); if not, it doesn't show up at all.
Formula:
If you have 4 items with weights 10, 10, 20, 60, the chance to pick the one with 60 is 60/100 (or 60%).
B. MinAmount and MaxAmount
MinAmountandMaxAmountset the range of how much of the item you can get in the chest.- If you use only
maxAmount(like in compact),minAmountis 1.
C. Enchantments
- Each enchantment on an item has its own weight (chance to be added), and its own level range.
- Lore lines show enchantments with the color you set (
LoreColor). - Use Bukkit's enchantment names.
D. LevelType
Romanshows levels as numerals ("V", "XII").- Good for normal Minecraft experience.
- Can only show up to level 3999.
- Default if you leave it out.
Standardshows as numbers, like "lvl_5".- Use if you want super high levels.
E. Using Filler Items (Like AIR)
Why use AIR or junk with a big weight?
- If you want diamonds to show up 0.1% of the time, make
AIR:1000andDIAMOND:1. - You can use any "junk" item as a filler, not just
AIR.
10. Color Codes Table (For CustomName and LoreColor)
Use these in CustomName or LoreColor.
Put quotes around CustomName if you use §.
| Color Name | Code | Example |
|---|---|---|
| BLACK | §0 | §0Black |
| DARK_BLUE | §1 | §1Dark Blue |
| DARK_GREEN | §2 | §2Dark Green |
| DARK_AQUA | §3 | §3Dark Aqua |
| DARK_RED | §4 | §4Dark Red |
| DARK_PURPLE | §5 | §5Dark Purple |
| GOLD | §6 | §6Gold |
| GRAY | §7 | §7Gray |
| DARK_GRAY | §8 | §8Dark Gray |
| BLUE | §9 | §9Blue |
| GREEN | §a | §aGreen |
| AQUA | §b | §bAqua |
| RED | §c | §cRed |
| LIGHT_PURPLE | §d | §dLight Purple |
| YELLOW | §e | §eYellow |
| WHITE | §f | §fWhite |
11. Example: Minimum, Expanded, and Everything-On
Minimal (custom)
MaxItemsPerSlot: 3
ChestSettings:
SimpleChest:
Items:
- STONE:10:1-3
Biomes: [PLAINS]
Vanilla Loot Table
ChestSettings:
VanillaOnly:
LootTables:
- ABANDONED_MINESHAFT:
- Weight: 100
Biomes: [LUSH_CAVES]
Everything On (full features, mix of all options)
MaxItemsPerSlot: 5
ChestSettings:
GodChest:
Items:
- DIAMOND_SWORD:
- Weight: 5
- MinAmount: 1
- MaxAmount: 1
- CustomName: "§bGod Sword"
- LevelType: Standard
- Enchantments:
- SHARPNESS:
- Weight: 100
- MinLevel: 4
- MaxLevel: 5
- LoreColor: RED
- LOOTING:
- Weight: 60
- MinLevel: 1
- MaxLevel: 3
- LoreColor: GREEN
- GOLDEN_APPLE:
- ChancePerChest: 10
- MinAmount: 2
- MaxAmount: 5
- CustomName: "§6Epic Apple"
- AIR:
- Weight: 100
Biomes: [PLAINS, DESERT, FOREST]
DungeonChest:
LootTables:
- SIMPLE_DUNGEON:
- Weight: 70
- GodChest:
- Weight: 30
Biomes: [LUSH_CAVES]
12. Tips, Common Mistakes, and Troubleshooting
- Tabs will break YAML. Always use spaces.
- Indentation matters! If your file breaks, check for extra or missing spaces.
- Use only valid names (items, biomes, enchants, loot tables). Copy from the Bukkit links.
- If nothing spawns:
- Make sure you didn't use an item or biome your server doesn't support.
- Check the logs for "Bad material" or YAML error messages.
- Try your file in https://www.yamllint.com/
- You can comment anywhere:
Use#at the start of the line. - CustomName with colors needs quotes:
Example:CustomName: "§6Golden Apple" - Mixing pools:
You can mix custom chests and vanilla loot tables in a pool. The plugin will pick one at random using your weights. - FAQ:
- Can I mix compact and expanded items? Yes.
- Do I need to reload? Yes, use
/reloador restart. - Can I use AIR or other fillers? Yes, to make rare drops show up less.
- What if I use both Weight and ChancePerChest? ChancePerChest wins.
- Does MaxItemsPerSlot work with vanilla loot? No, only custom.
Need more help or real-world configs? Ask on the plugin's GitHub. Screenshots, questions, and errors all help!