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).
a suggestion or how
How would i beable to give a bag to someone, example /sbag gift bagname username
@wumpyc
Good question. It works only on the bags' config (e.g. surprisebag.yml).
Limit mobs works in config.yml or bag.yml?
I love this plugin :D
People are farming surprise bags with enderman spawners. Please do something around that.
/pe only works if you have egg in hand
make a plugin like this if you make it add me on skype albin1122 / gamepixel13
PRIZEEGG
comands:
/additem 1-100(Chance). Then it opens a gui to put the item in (Enchanted and Renamed Items Work)
/Pe Opens egg gui with items Max 5 ITEMS(VERY-REAR)
/Peggme Gives 3 eggs ONLY works every 48 hours
Info Plus Premissons:
Premisson for /additem : pegg.add
Premisson for /pe : pegg.Open
Premisson For /peggme pegg.Donator
INFO:
Support For Kit Plugins
Just A simpel plugin for Voters / Donators
Love the plugin :D
Your plugin is awesome. I had to say it. I've spent all day creating lore items and putting them into Surprise bags that are dropped by mobs.
SurpriseBags+ ItemLoreStats+ Lores = absolutely new Minecraft experience.
@catprowler
You can edit the bag's content in-game, which is the easiest way to add or change an item. For the full list of item names, you need to see the Bukkit documentation of ItemStack. Item IDs cannot be used because Bukkit will not support them in the future.
Hi there, I noticed that the yml files mostly uses names instead of id's. Will it accept any minecraft item name? For example. type: FIREWORK_ROCKET, amount: 3, type: NAME_TAG, GLISTERING MELON, SPAWN_HORSE. Thank you.
@slugshelI
Hi, I am using Nexus as an artifact repository.
@eyalzh Now you got me some research to do on my day off tomorrow. All together it sounds awesome ;].
@MikeGold
Yes, if you use something like essentials you can create custom items and just add them to the bag's inventory (use /surprisebags edit command)
Hi, is there a jenkins repository for your plugin?
Can you put items with custom lore into those bags? Edit It would be nice if I could config custom lore for the items dropped from the bags. It would make them unique plus on top of that I could use them with item-lore-stats ;]
@catprowler
Last update included "Wintersday Gifts" which you can rename to "Christman Gifts". You have full control over the kinds of bags, their names, drop chance and contents.
Will this be updated to say Merry Christmas instead of Trick or treat? I have hit plugin and I love it. Just curious. Thank you.
Excellent plugin! I love the way it's so easy to add new items and after Halloween is over it's easy enough to reuse this plugin for xmas, be just creating a new set of xmas gift surprise bags. Thanks for your hard work!
This is just a very simple and very rewarding plugin for your players at any time. But it especially works well on holidays such as Christmas, Halloween and Easter.
Just awesome eyalzh just awesome!