HomeJavaModsMystery Bags [1.15]
Mystery Bags [1.15]
ModsJava

Mystery Bags [1.15]

Customizable surprise mystery bags that can drop from mobs and contain random items!. Free Minecraft Java mod for 1.9, 1.10, 1.11.

⬇ Download on Spigot

Description
Coded from scratch as a 1.9+ replacement for and improvement on the inactive SurpriseBags plugin, MysteryBags adds special customizable items into your world that can drop from mobs and animals. After a player obtains one, he/she can hold the item and right click to open the bag, causing the bag to disappear, and leaving the player with a random item!

Bags can be created with a simple in-game command. Afterwards, you can edit it to your heart's content in the plugin's folder!


Features

Commands
<Required field> [Optional field]
Permissions

Notable Differences from SurpriseBags
This plugin is designed to be as closely compatible with existing SurpriseBags configs as possible; however, there are obviously still changes that need to be made before porting over old bags and configs!
To update SurpriseBag configs into MysteryBag configs, simply copy/paste the following lines into the respective files (and edit them as needed):
Spoiler: Add-on for config.yml
# Does a player have to kill a mob to have a chance at a bag?
require-player-kill: yeah

### OPTIONAL
# Can mobs from spawners drop Mystery Bags?
# This value will override the global value.
allow-spawner-drop: no

### OPTIONAL
# Can baby animals drop Mystery Bags?
# Does not apply to zombies.
# This value will override the global value.
allow-baby-drop: no

#
# Looting Chance Increase
# Only effective if looting-sensitive is true - the drop rate will
# be boosted by this amount for every level of looting.
looting-effectiveness: 0.05

#
# Looting-Increases-Amount
# If true, then Looting will have a chance to increase the amount of
# bags dropped when a player gets one.
looting-increases-amount: no

#
# Message to tell players what they got
# %ITEMNAME% - name of item, or item material if unnamed
# %ITEM% - item material
open-message: 'The bag contained %ITEMNAME%!'

#
# Announce Rare Loot
# If true, the announce-rare-loot-message will broadcast every time
# a player gets a reward from the rare-items list.
announce-rare-loot: indubitably

#
# Rare Loot Firework
# If true, a firework will launch at the player's location upon
# getting rare loot.
rare-loot-firework: k

#
# Rare Loot Sound
# If true, the "wither spawn" sound will play for everyone
# if a player gets rare loot.
rare-loot-sound: true

#
# %PLAYER% - name of Player
# %ITEMNAME% - name of item, or item material if unnamed
# %ITEM% - item material
announce-rare-loot-message: '%PLAYER% got lucky and received %ITEMNAME% from a Mystery Bag!'

#
# Whether or not to keep track of how many of each bag each player
# has opened. Data will be written to output.yml
log-bags: no

#
# Whether or not to keep track of rare loot players get.
# Data will be written to output.yml
log-rare-loot: no

#
# Items listed here are considered rare loot. These only affect the rare loot message.
# Format:
# ITEM:
# - 'If this list isn't empty,'
# - 'the item is only rare if item name'
# - 'is contained within this list.'
# - 'Use & for color codes.'
## This item is always rare no matter the name:
# OTHER_ITEM: []
rare-loot:
DIAMOND: []
Spoiler: Add-on for Bag Files
#
# IMPORTANT!!!!!!!!!!!!!!!!!!!!!!!
# Change 'openmsg' to LIST format!
# For instance:
#
# openmsg:
# - "&2Hold item and right click to open!"
#

#
# Whether this bag will trigger the drop check
#
enabled: false

#
# Same as drop-chance, except defined per mob.
# Values here override the drop-chance above.
drop-chance-mobs:
- ZOMBIE: 0.2


Default Configuration Files
Spoiler: Default config.yml
#
# CheezBags config file
#

#
# General settings:
#

# DONT CHANGE THIS!!!!
version: 1

# Will a random bag drop from mobs, set to yes/no
# Not just limited to hostiles
drop-from-mobs: yes

# Should MysteryBags drop separately from the mob's normal?
# Set this option to TRUE if you suspect a plugin conflict
# is preventing bags from dropping!
override-drops: no

# Does a player have to kill a mob to have a chance at a bag?
require-player-kill: yeah

# Can mobs from spawners drop Mystery Bags?
# This is the default value and can be overridden in
# in individual bag configs.
default-allow-spawner-drop: no

# Can baby animals drop Mystery Bags?
# Does not apply to zombies.
# This is the default value and can be overridden in
# in individual bag configs.
default-allow-baby-drop: no

#
# Looting Sensitive
# If true, then the drop chance for each bag will increase for
# every level of the looting enchantment. That is, if players are
# using a looting sword, they have higher chances of getting bags.
#
looting-sensitive: no

#
# Looting Chance Increase
# Only effective if looting-sensitive is true - the drop rate will
# be boosted by this amount for every level of looting.
looting-effectiveness: 0.05

#
# Looting-Increases-Amount
# If true, then Looting will have a chance to increase the amount of
# bags dropped when a player gets one.
looting-increases-amount: no

# A list of WorldGuard regions to limit the drops.
# This is useful if you want bags to drop only in spawn, for example.
# You must have WorldGuard installed for this to work (duh).
# Bags will attempt to drop everywhere if this is empty ('[]').
drop-limit-to-area: []

#
# Limit drops to particular worlds.
# If this is not empty ('[]'), bags will only drop on those worlds.
# Otherwise bags will attempt to drop in all worlds.
drop-limit-to-world: []

#
# Message to tell players what they got
# %ITEMNAME% - name of item, or item material if unnamed
# %ITEM% - item material
# %BAG% - display name of the bag item, or the bag id if the item doesn't have a name
open-message: 'The bag contained %ITEMNAME%!'

#
# Opening Spy Message
# If true, server ops will get a message whenever a user opens a bag.
openingspymessage: sure

#
# Announce Rare Loot
# If true, the announce-rare-loot-message will broadcast every time
# a player gets a reward from the rare-items list.
announce-rare-loot: indubitably

#
# Rare Loot Firework
# If true, a firework will launch at the player's location upon
# getting rare loot.
rare-loot-firework: k

#
# Rare Loot Sound
# If true, the "wither spawn" sound will play for everyone
# if a player gets rare loot.
rare-loot-sound: true

#
# %PLAYER% - name of Player
# %ITEMNAME% - name of item, or item material if unnamed
# %ITEM% - item material
# %BAG% - display name of the bag item, or the bag id if the item doesn't have a name
announce-rare-loot-message: '%PLAYER% got lucky and received %ITEMNAME% from a &e%BAG%&6!'

#
# Whether or not to keep track of how many of each bag each player
# has opened. Data will be written to output.yml
log-bags: no

#
# Whether or not to keep track of rare loot players get.
# Data will be written to output.yml
log-rare-loot: no

#
# Items listed here are considered rare loot. These only affect the rare loot message.
# Format:
# ITEM:
# - 'If this list isn't empty,'
# - 'the item is only rare if item name'
# - 'is contained within this list.'
# - 'Use & for color codes.'
## This item is always rare no matter the name:
# OTHER_ITEM: []
rare-loot:
DIAMOND: []
Spoiler: Default treasure.yml
#
# Whether this bag will trigger the drop check
#
enabled: false

#
# The material of the bag item. This is "CHEST" by default.
# When using a data value, make sure the entire line has ''s around it!
material: 'CHEST:0'

#
# The item's display name.
# You may use color codes with the '&' character.
#
displayname: "&3Mysterious Treasure"

#
# A friendly message on the item lore description.
# You may use color codes with the '&' character.
# May be a single line or multiple lines.
#
openmsg:
- "&2Hold item and right click to open!"

#
# Whether to always announce drops from this bag
# as a "rare" item - sounds and fireworks included
#
always-rare: false

# Will opening the bag give all items inside it?
give-all-items: no

# Can mobs from spawners drop Mystery Bags?
# This value will override the global value.
allow-spawner-drop: no

# Can baby animals drop Mystery Bags?
# Does not apply to zombies.
# This value will override the global value.
allow-baby-drop: no

#
# Can only drop from these mobs.
# Leave empty to drop from all mobs.
limit-mob:
- ZOMBIE

#
# Can only drop in these worlds.
# IS OVERRIDDEN BY the global world limits.
limit-world: []

#
# Chance that the bag fails and player gets Nausea
failure-chance: 0.0

#
# message to send player when it fails
failure-lines:
- '&2That didn''t feel very good.'
- '&2It was a trap!'

#
# Global Mob drop-chance.
#
# On top of the global drop-chance, this states the
# chance of this particular bag dropping by a mob.
#
# 0.05 is %5, 0.10 is 10%, 0.5 is 50% and so on.
#
drop-chance: 0.05

#
# Same as drop-chance, except defined per mob.
# Values here override the drop-chance above.
drop-chance-mobs:
ZOMBIE: 0.2

#
# The items in the bag.
#
# This bag has 1 enchanted book, 1 ghast tear, 2 diamond blocks and other items.
#
# When players open the bag, they get exactly 1 item from the bag (e.g. 1 Dblock).
# This means that players are more likely to get a diamond block than a ghast tear.
#
items:
- ==: org.bukkit.inventory.ItemStack
type: ENCHANTED_BOOK
amount: 1
meta:
==: ItemMeta
meta-type: ENCHANTED
stored-enchants:
DAMAGE_ALL: 4

- ==: org.bukkit.inventory.ItemStack
type: GHAST_TEAR
amount: 1

- ==: org.bukkit.inventory.ItemStack
type: NETHER_STAR
amount: 1

- ==: org.bukkit.inventory.ItemStack
type: DIAMOND_BLOCK
amount: 2

- ==: org.bukkit.inventory.ItemStack
type: ENDER_PEARL
amount: 2

- ==: org.bukkit.inventory.ItemStack
type: DIAMOND_BOOTS
meta:
==: ItemMeta
meta-type: UNSPECIFIC
enchants:
PROTECTION_FALL: 3

- ==: org.bukkit.inventory.ItemStack
type: DIAMOND_CHESTPLATE
meta:
==: ItemMeta
meta-type: UNSPECIFIC
enchants:
PROTECTION_EXPLOSIONS: 3

- ==: org.bukkit.inventory.ItemStack
type: DIAMOND_LEGGINGS
meta:
==: ItemMeta
meta-type: UNSPECIFIC
enchants:
PROTECTION_ENVIRONMENTAL: 3

- ==: org.bukkit.inventory.ItemStack
type: DIAMOND_HELMET
meta:
==: ItemMeta
meta-type: UNSPECIFIC
enchants:
OXYGEN: 3
Spoiler: Default gift.yml (an example using a custom head as a bag)
#
# Whether this bag will trigger the drop check
#
enabled: false

#
# The material of the bag item. This is "CHEST" by default.
# When using a data value, make sure the entire line has ''s around it!
material: 'eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZDJhYzFjNTE4MDdlMjYxYzEyYzRmMmFkYmFkMzZiOGIyYzQ5N2MyNzdmNzIyM2VjMjQ0Y2I0NjA4YzU5YyJ9fX0='

#
# The item's display name.
# You may use color codes with the '&' character.
#
displayname: "&cFancy Gift"

#
# A friendly message on the item lore description.
# You may use color codes with the '&' character.
# May be a single line or multiple lines.
#
openmsg:
- "&2Hold item and right click to open!"

#
# Whether to always announce drops from this bag
# as a "rare" item - sounds and fireworks included
#
always-rare: false

# Will opening the bag give all items inside it?
give-all-items: no

# Can mobs from spawners drop Mystery Bags?
# This value will override the global value.
allow-spawner-drop: no

# Can baby animals drop Mystery Bags?
# Does not apply to zombies.
# This value will override the global value.
allow-baby-drop: no

#
# Can only drop from these mobs.
# Leave empty to drop from all mobs.
limit-mob:
- ZOMBIE;Bob

#
# Can only drop in these worlds.
# IS OVERRIDDEN BY the global world limits.
limit-world: []

#
# Chance that the bag fails and player gets Nausea
failure-chance: 0.0

#
# message to send player when it fails
failure-lines:
- '&2That didn''t feel very good.'
- '&2It was a trap!'

#
# Global Mob drop-chance.
#
# On top of the global drop-chance, this states the
# chance of this particular bag dropping by a mob.
#
# 0.05 is %5, 0.10 is 10%, 0.5 is 50% and so on.
#
drop-chance: 0.05

#
# Same as drop-chance, except defined per mob.
# Values here override the drop-chance above.
drop-chance-mobs:
ZOMBIE: 0.2

#
# The items in the bag.
#
# This bag has 1 enchanted book, 1 ghast tear, 2 diamond blocks and other items.
#
# When players open the bag, they get exactly 1 item from the bag (e.g. 1 Dblock).
# This means that players are more likely to get a diamond block than a ghast tear.
#
items:
- ==: org.bukkit.inventory.ItemStack
type: ENCHANTED_BOOK
amount: 1
meta:
==: ItemMeta
meta-type: ENCHANTED
stored-enchants:
DAMAGE_ALL: 4

- ==: org.bukkit.inventory.ItemStack
type: GHAST_TEAR
amount: 1

- ==: org.bukkit.inventory.ItemStack
type: NETHER_STAR
amount: 1

- ==: org.bukkit.inventory.ItemStack
type: DIAMOND_BLOCK
amount: 2

- ==: org.bukkit.inventory.ItemStack
type: ENDER_PEARL
amount: 2

- ==: org.bukkit.inventory.ItemStack
type: DIAMOND_BOOTS
meta:
==: ItemMeta
meta-type: UNSPECIFIC
enchants:
PROTECTION_FALL: 3

- ==: org.bukkit.inventory.ItemStack
type: DIAMOND_CHESTPLATE
meta:
==: ItemMeta
meta-type: UNSPECIFIC
enchants:
PROTECTION_EXPLOSIONS: 3

- ==: org.bukkit.inventory.ItemStack
type: DIAMOND_LEGGINGS
meta:
==: ItemMeta
meta-type: UNSPECIFIC
enchants:
PROTECTION_ENVIRONMENTAL: 3

- ==: org.bukkit.inventory.ItemStack
type: DIAMOND_HELMET
meta:
==: ItemMeta
meta-type: UNSPECIFIC
enchants:
OXYGEN: 3


----------------------------------------------------------------------------------------------------


Found a bug? Got a feature request or suggestion?
Please leave a comment or shoot me a PM! :D


----------------------------------------------------------------------------------------------------

View the Source Code on GitHub.

----------------------------------------------------------------------------------------------------

Commands

Plugin details

Read from the plugin's own plugin.yml.

Mystery Bags [1.15] is a free Minecraft Java mod. Compatible with Minecraft 1.9, 1.10, 1.11. Downloaded 6,819 times (via Spigot). Download it and open it directly in the game.

Explore more