Surprise Bags
Description
This plugin adds various treasures and surprise bags to your world. These special items will be dropped by naturally-spawned monsters such as Zombies and Spiders. When players obtain the surprise bags, they can open them by clicking the right mouse button while holding them. They will then get a random item and the bag will disappear.
The list of surprise bags is set in the configuration files of the plugin, as well as the list of items that the player can receive when opening each bag. The plugin comes with a predefined set of bags:
- Treasure
- Trick-or-treat Box (perfect for Halloween)
- Surprise Bag
- Unknown Book
- Wintersday Gift (perfect for Christmas)
Each such item has a different drop-rate. Please see the configuration files for more information.
For example, players who open an Unknown Book might get a sharpness I enchanted book or a different enchanted book. Trick-or-treat boxes might get the player a raw fish, a pumpkin pie or, rarely, a diamond helmet.
Commands
There is one main command and several sub-commands:
- /surprisebags version - Get the plugin's version.
- /surprisebags spawn <bag> [count] [player] - Give you or a player a bag by name.
- /surprisebags list - List of existing bags.
- /surprisebags edit <bag> - Edit the bag's contents.
- /surprisebags save <bag> - Save the bag's contents to the configuration file.
- /surprisebags addbag <bag-id> [name] [drop-chance] - Add a new bag
- /surprisebags removebag <bag-id> - remove a custom bag
- /surprisebags reload - Reload the configuration files.
Permissions
There are three permission settings:
- surprisebags.command - Allows you to use the SurpriseBags admin command (defaults to admins only).
- surprisebags.openbag - Allows you to open bags (defaults to everyone).
- surprisebags.edit - Allows you to edit or save the bags contents (defaults to admins only).
Configuration
You may add/remove surprise bags by using the in-game commands. You can change different settings by editing config.yml, which is in the plugin's folder after installation. Each bag has its own YAML file, where you can list the items that players will receive when opening the bag. The players will always receive exactly one item, so adding many items of the same type will increase the chance of receiving them, whereas items which appear only once will be rare. You may open the configuration files of any of the predefined bags (e.g. Trick-or-treat box) to see how these lists work.
You may change the general drop-rate of bags, as well as the specific drop-rate of each bag.
If you have WorldGuard installed, you may limit the drops to one region. The region ID is set on config.yml.
If you want a bag to drop from a specific list of mobs, you can add the "limit-mob" setting to the bag's yaml file. For example:
# # Limit Mobs # # Limit the drop of this bag to the listed mobs only. # limit-mob: - creeper - zombie
Note that this should be in the bag's file, not in config.yml (in other words, it is defined per bag).
-
View User Profile
-
Send Message
Posted Feb 14, 2014This looks fun!
Is it possible to play a (configurable) sound (server-wide) whenever someone (picks/opens) up a surprise bag?
Iif not, please consider adding it.
Thanks! :) +3
-
View User Profile
-
Send Message
Posted Feb 11, 2014Awsome <3
-
View User Profile
-
Send Message
Posted Feb 10, 2014@gv1222
Yea, I see now. The bag item itself cannot be edited. You can just specify the material type.
I can change that in future versions.
-
View User Profile
-
Send Message
Posted Feb 8, 2014@eyalzh
Yeah that was just modifying config. I don't actually see a command to edit the drop item in-game though. The sbag edit command only allows you to edit the contents of the bag, not the item that is going to drop as the bag. From what i have tested i have not found a way to set the bag item that drops (Chest by default) from ingame.
-
View User Profile
-
Send Message
Posted Feb 7, 2014@gv1222
Are you editing the config files manually? If so, try the in-game edit command instead.
-
View User Profile
-
Send Message
Posted Feb 5, 2014Having an issue using items with damage values being used as the bag item. I have tested "STAINED_GLASS:5" but that doesn't seem to be accepted, what would be the correct value?
-
View User Profile
-
Send Message
Posted Jan 10, 2014Can I see the source code?
-
View User Profile
-
Send Message
Posted Jan 1, 2014@TheTrappedGamer
Do you mean that more than one item will drop when opening the bag? That's not possible.
-
View User Profile
-
Send Message
Posted Jan 1, 2014@vagrantmike
Yes, you can add the "limit-mob" setting in the bag's config file. For example:
-
View User Profile
-
Send Message
Posted Dec 31, 2013Is it possible in the config to specify what mobs can drop the surprise bags?
-
View User Profile
-
Send Message
Posted Dec 29, 2013Is it possible to have more than one item per bag?
-
View User Profile
-
Send Message
Posted Dec 26, 2013this pluggin does not work well with diablo drops pluggin. great idea but had major problems with it alongside diablo drops i would get items and then click on them and it would drop me from the server.
-
View User Profile
-
Send Message
Posted Dec 24, 2013is it possible to limit the bags dropping if the mob was killed by a player? Also does the latest version still work with 1.6.4?
-
View User Profile
-
Send Message
Posted Dec 23, 2013can you add economy support such as money as a options to drop that way i can make Money Bags that drop.
-
View User Profile
-
Send Message
Posted Dec 21, 2013@TFCrysis
Unfortunately, that is not possible. If you simply want to get a random number between 1 and 54 (double chest size) you can add 54 items to the bag, each with a different number in its lore.
-
View User Profile
-
Send Message
Posted Dec 21, 2013How do I make i to where players have a chance to get items like like a 1-64 range? ex: in my surprise bag for voting I put 64 obsidian and 8 diamonds in but players only get 1 diamond or 1 obsidian each time they open the bag. How do I make it to where they can get like 1-8 diamonds or 1-64 obsidian?
-
View User Profile
-
Send Message
Posted Dec 15, 2013@Joymo
Mobs spawned with a command will not drop bags. The spawner drops flag refers to mobs spawned by a spawner (item 52).
-
View User Profile
-
Send Message
Posted Dec 15, 2013I am unable to get any of the bags to drop, using basically default config, enabled spawner drops as I'm using a command to spawn zombies. Killed 40 and 0 drops. There's really no permission node for drops right? Anything that could be breaking drops?
-
View User Profile
-
Send Message
Posted Dec 13, 2013Suggestions
Other than that, nice plugin :)
-
View User Profile
-
Send Message
Posted Dec 13, 2013Hey man I did a review on your plugin! Great work! You can watch it here - https:www.youtube.com/watch?v=GNGWnzYXKu4 Keep up the good work!