-
Notifications
You must be signed in to change notification settings - Fork 1
Custom‐Loot.md
The Custom Loot System lets you build your own loot tables for each chest tier using an in-game GUI. No YAML editing required.
/putintothechest
Aliases: /customloot · /chestloot · /editloot
Permission: spawnchest.admin
Opens the Main Menu with three tier icons — Common, Rare, and Legendary. Click any tier to edit its loot table.
┌──────────────────────────────────────────┐
│ 0 1 2 3 4 5 6 7 8 │ Row 1: Items
│ 9 10 11 12 13 14 15 16 17 │ Row 2: Items
├──────────────────────────────────────────┤
│ [◀] [▶] [📄] [▶] [💾] [⬅] [🚫] │ Controls
└──────────────────────────────────────────┘
Type - Info + Save Back Reset
┌──────────────────────────────────────────┐
│ Rows 1–5: Items (45 slots) │
├──────────────────────────────────────────┤
│ Controls (9 slots) │
└──────────────────────────────────────────┘
Switches between Single (27 slots, 18-item area) and Double (54 slots, 45-item area).
Single → Double: All items carry over to the larger chest.
Double → Single: First 18 items stay. Any remaining items drop at your feet with a message showing how many dropped.
Settings (fraction and chest type preference) are always preserved through size changes.
Moves the drop rate down: All → 1/2 → 1/3 → 1/4 → … → 1/10
Shows the current drop rate. Click-through only, not interactive.
Moves the drop rate up: 1/10 → … → 1/3 → 1/2 → All
Saves all items from the chest area, enables custom loot for this tier, then returns to the main menu.
Saved 15 items for common chests.
Returns to the main menu without saving.
Opens a two-step confirmation flow before clearing items.
Shows tier name, current item count, and a reminder that chest type and fraction are preserved. Options: Continue or Cancel.
Last chance. Confirms that all items will be deleted (dropped at your feet) and custom loot disabled. Options: Confirm or Cancel.
What gets reset:
- All saved items (dropped at your location)
- Custom loot enabled status
What is preserved:
- Chest type (single / double)
- Item fraction setting
Click an item in your inventory while the edit menu is open. It moves into the chest area.
Shift-click an item in your inventory. It moves to the first empty slot in the chest area automatically.
All item properties are preserved:
- Enchantments
- Custom names and lore
- Custom model data
- NBT data
- Durability / damage value
When a chest spawns the plugin:
- Takes all saved items from your loot table
- Shuffles them randomly
- Picks the configured fraction
- Places those items in the chest
| Saved Items | Fraction | Items per Chest |
|---|---|---|
| 30 | All | 30 |
| 30 | 1/2 | 15 |
| 30 | 1/3 | 10 |
| 30 | 1/4 | 7–8 |
| 30 | 1/10 | 3 |
Balance quantities. Avoid stacking 64 of every valuable item. Mix 1–5 high-value items with a larger filler pool.
Mix item categories. A chest with only diamonds is boring and unbalanced. Aim for weapons, armor, tools, food, materials, and potions.
Use fractions for variety. A pool of 30 items with 1/3 fraction means each spawn feels different. Players have a reason to open more than one chest.
Test before events. Save your loot table, run /chestnow, and open the chest to see what spawns. Adjust fraction or item counts as needed.
Type: Single · Fraction: 1/2 · Pool size: 18
Weapons, iron armor, basic tools, food, common materials, a few ender pearls.
Type: Double · Fraction: 1/3 · Pool size: 45
Enchanted diamond gear, potions of Strength/Speed, golden apples, netherite scrap, elytra, totem of undying, enchanted books.
Type: Double · Fraction: All · Pool size: 30
All nine legendary items, netherite ingots, enchanted golden apples, max-enchanted netherite armor, Summoner Apples, totems.
Items not appearing in spawned chest
- Did you click Save?
- Is the tier shown as enabled (green) in the main menu?
- Is the fraction too low? 1/10 of 5 items = 0–1 items.
Cannot place items in the edit area
- Make sure you are clicking inside the item area, not the control row.
- Check if the area is full (18 slots for single, 45 for double).
Items dropped on chest type change This is expected when switching from Double to Single. Items that do not fit drop at your feet.
Reset did not work
Both confirmation steps must be completed. Check custom_loot.yml — the items list should be empty after a successful reset.
File: plugins/SpawnChestPlugin/custom_loot.yml
common:
enabled: true
double-chest: false
item-fraction: "one-third"
items:
- ==: org.bukkit.inventory.ItemStack
v: 3700
type: DIAMOND_SWORD
meta:
==: ItemMeta
meta-type: UNSPECIFIC
display-name: "§cCustom Sword"
enchants:
DAMAGE_ALL: 5
rare:
enabled: false
double-chest: true
item-fraction: "one-half"
items: []
legendary:
enabled: true
double-chest: true
item-fraction: "all"
items: []
Manual editing is complex and error-prone. Use the GUI whenever possible.
Can I configure each tier separately?
Yes. Common, Rare, and Legendary each have their own independent loot table.
Do I need to reload after saving?
No. Changes apply immediately.
Can I use items from other plugins?
Yes. Any item in your inventory can be added, including items with custom plugin data.
Is there a maximum pool size?
Single chest: 18 items. Double chest: 45 items.
Can I copy loot tables between servers?
Yes. Copy custom_loot.yml to the other server.
What happens to already-spawned chests after I change the loot?
Existing spawned chests keep the loot they already have. Only new spawns use the updated table.