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).
Such a great plugin! The only "complaint" I have is that you didn't mention that they don't drop from monster spawners and monster-spawned eggs - I spent 2 hours testing this LOL! Don't get me wrong, that's a very good thing, just wish I had a heads up before testing... hahha!
Edit: Small bug I forgot to mention. When editing the Quantity of prize item they get inside of a bag, it never gives out more than 1 of that item.
Amazing plugin, thank you so much!
This plugin is a breath of fresh air to my server =) People now love to Hunt mobs . since my server is Dificulty 3 Thanks for this plugin m8 - really awsome ;)
@Nutiler
Added a setting to disable that in the next version and made it less verbose. Thanks for feedback.
@Calipheran
Thanks for letting me know. Fixed in the next version.
Any way to disable the opening message because [SBAG] Nutiler opened a unkown-book. Got ItemStack{enchanted book}x1=META: bla bla bla. Looks awful, Any way to set it to like Nutiler found *amount* *item*s!
Or even a config to set it to what ever, thanks!
CB 1.6.2 1.0 drop from mobs doesnt work Clicking on the floor with the right hand gives this error: http://pastebin.com/raw.php?i=wD2SX9wn
looks cool ima try it.
I will try this too :) Thanks for your plugin :)
interesting. i might try this.