Usage & Documentation
Commands:
- /lootbag give <player> <bag> [amount] — Gives a loot bag to a player
- /lootbag list — Lists all loaded loot bags
- /lootbag validate — Validates loaded loot bag configs
- /lootbag reload — Reloads all configs
Aliases:
Permissions:
- simplelootbags.give — use /lootbag give
- simplelootbags.list — use /lootbag list
- simplelootbags.validate — use /lootbag validate
- simplelootbags.reload — use /lootbag reload
Loot Bag YAML Reference:
name: '<gradient:#ffa500:#ff4500>Starter Bag</gradient>'
item:
material: BUNDLE
display-name: '<yellow>Starter Loot Bag'
custom-model-data: 1001
lore:
- '<gray>Right-click to open!'
- '<dark_gray>Contains random starter rewards.'
rolls: 3
contents:
diamonds:
item:
material: DIAMOND
amount: 2
display-name: '<aqua>Shiny Diamond'
weight: 5
effects:
chat: '<green>You received <aqua>Diamonds</aqua>!'
action-bar: '<aqua>+2 Diamonds'
sound:
name: ENTITY_PLAYER_LEVELUP
volume: 1.0
pitch: 1.0
particles:
type: HAPPY_VILLAGER
count: 20
gold:
item:
material: GOLD_INGOT
amount: 6
display-name: '<gold>Gold Ingots'
weight: 10
effects:
action-bar: '<gold>You received gold!'
sound: ENTITY_EXPERIENCE_ORB_PICKUP
money_command:
item:
material: PAPER
display-name: '<green>Money Reward'
weight: 3
command: 'eco give %player% 500'
effects:
title:
title: '<green>Money Reward!'
subtitle: '<yellow>+$500'
fade-in: 10
stay: 40
fade-out: 10
rank_command:
item:
material: NAME_TAG
display-name: '<light_purple>Temporary Rank'
weight: 1
command: 'lp user %player% parent addtemp vip 1d'
effects:
broadcast: '<gold>%player%</gold> found a rare VIP reward!'
sound: ENTITY_ENDER_DRAGON_GROWL
Reward item options:
- material — Bukkit/Spigot material name, for example DIAMOND
- amount — item amount
- display-name — MiniMessage display name
- lore — MiniMessage lore lines
- custom-model-data — custom model data for resource-pack items
- command — optional console command reward
- weight — random selection weight
Effect options:
- chat — sends a chat message to the player
- action-bar / actionbar — shows an action bar message
- title — shows title and subtitle
- status-bar / boss-bar — shows a boss bar style status message
- sound — plays a sound
- particles — spawns particles around the player
- broadcast — broadcasts a message to the server
Full effects example:
effects:
chat: '<green>You got %reward_id%!'
action-bar: '<aqua>Reward claimed!'
title:
title: '<gold>Loot Bag Opened!'
subtitle: '<yellow>%reward_id%'
fade-in: 10
stay: 40
fade-out: 10
status-bar:
message: '<gold>%bag_name%</gold>'
color: YELLOW
overlay: PROGRESS
progress: 1.0
duration-ticks: 60
sound:
name: ENTITY_PLAYER_LEVELUP
volume: 1.0
pitch: 1.0
particles:
type: HAPPY_VILLAGER
count: 25
broadcast: '<gold>%player%</gold> found <yellow>%reward_id%</yellow>!'
Placeholders:
- %player% — player name
- %bag_id% — internal bag ID
- %bag_name% — configured bag name
- %reward_id% — internal reward ID
How to use bags in other loot plugins:
- Use /lootbag give <player> <bag> to get the bag
- Hold it in your hand
- Run /data get entity @p SelectedItem
- Copy the item/NBT output into your mob drop, crate, chest or loot plugin
Works with:
- Mob drop plugins
- Crate plugins
- Vote reward plugins
- Chest loot plugins
- Custom resource packs using custom model data
- Any Spigot/Paper server that supports the configured version
Tips:
- Use different custom-model-data values for unique bag textures
- Use /lootbag validate after editing YAML files
- Use command rewards for money, permissions, ranks, keys or other plugin rewards
- Keep SimpleLootBags vanilla-focused; use AdvancedLootBags if you need Oraxen, ItemsAdder, Nexo or SupremeTags