ChestRestock
This plugin allows admin to set up chests that automatically restock based on configurable parameters. This will allow you to create special chests for a variety of situations. You could create a chest for people new to your server containing a set of starter gear that they can only loot once. Or make reward chests in dungeons where you don't have to worry about them being empty. All kinds of things are possible!
Features:
- Automatically-restocking chests
- Chests can either add to or replace their current stock
- Configurable restock period
- Can either be set to start timing based on the time a player last opened the chest or at fixed intervals
- Can be set to preserve the position of the items in the chest
- Restocking chests are indestructible by default
- Limit # of times a player may loot each chest
- Restock chest by command
- Full multi-world support
- Chest naming
- Unique properties per chest (for any of the chest properties)
- Global default settings for all chests and optionally world specific defaults
- NEW in 2.0 Option for chests to have unique inventories per player (No loot theft!)
- NEW in 2.0 Option for chests to redstock when they receive redstone power
- NEW in 2.0 Commands are more dynamic
- NEW in 2.0 Now works with ANY block based inventory (dispensers, crafting benches, etc)
- NEW in 2.1 Option for chest to broadcast a global message when it restocks
- NEW in 2.2 Randomized loot for chests!
- NEW in 2.3 Command to restock all chests or chests with specific names and/or in specific worlds
- NEW in 2.3 Ability to set all chests in a world to restock with what is currently inside of them (This is limited by default to NOT include newly created chests!)
Instructions
- Place ChestRestock.jar in your plugins folder.
- Start your server.
- Type while in game for a list of commands
/cr
- Or target a chest and type This will set up the chest with default settings (adjustable in config.yml) and will restock with the items currently in the chest.
/cr create
Permissions
All permissions are default: OP
- chestrestock.*: grants all permissions
- chestrestock.cmd.*: grants all command permissions
- chestrestock.cmd.<cmdname>: grants specific command permission
- chestrestock.break.*: allows breaking any chest
- chestrestock.break.<chestname>: allows breaking specific chest
- chestrestock.bypass.lootlimit.*: allows unlimited looting of any chest
- chestrestock.bypass.lootlimit.<chestname>: allows unlimited looting of specific chest
- chestrestock.cmd.*: grants all command permissions
Further Help
- Type /cr help for a list of commands.
- Type /cr set while targeting a chest you have initialized with /cr create to see a list of properties you can set for it.
- Type /cr set <propertyname> to see a description of what the property does.
- Type /cr set <propertyname> <value> to set a value for a property.
- global_defaults.yml contains default chest settings for when a world does not have a specific default.
- defaults/<worldname>.yml contains default chest settings for specific worlds.
- If a default setting is missing for a world, the default in global_defaults.yml will be used.
- Loot Table Tutorial
IF YOU ARE HAVING LOOT TABLE PROBLEMS
First, go here: http://yaml-online-parser.appspot.com/
Paste your loot table file into the left-hand box. If it says you have problems in the right-hand box, this is why it doesn't work for ChestRestock.
Yaml is a very particular file format and it doesn't like when you don't enter things correctly. Read a tutorial.
Can I please get some help, this plugin is not working on my server.
server log > http://pastebin.com/YYnBC6n
@markdf
IF you succeed let me know. The idea behind this chest is that it should get random items, we have no need for a restocking chest!
It would behoove you to probably make the loot_tables easier to understand. It is a bit complicated, this is why I do not use them. If it was easier I would use this plugin and donate for sure! If you could make it easier to understand/easier to use, that would be great!
@Ethrock
I'm not having any success with the loot table either. For now I'm just using set items to restock, although I will try again soon with the loot table.
If anyone has any idea why the loot_table on my chest won't work please help!
I have created a loot table .yml file called givingtree and I have displayed it on here once before.
I then use
/cr create /cr set loot_table givingtree /cr set unique false
However, it restocks empty each time, unless I place an item in and reset it, then it will stock with the item I placed in. Loot tables are being completely ignored.
Thanks! This plugin is exactly what I needed.
Hey, great plugin, just wanted to point out a bug I found:
Setting restock_mode to add doesn't seem to work if the preserve_slots setting isn't changed from true (default) to false.
Still having the persistent problem that my loot table won't work! Please help =(
Works for 1.3.1?
Does this support thew ''Book & Quill''? So its possible to copy them too?
Is there a way to set it so that world generated chests are always unique and unbreakable but player placed ones are not unless specified?
@MazeCraftServer
Yes, set the setting "Unique" to true using the /cr set command. So it should go /cr set unique true
then set the player loot limit to 1, so set it using /cr player_limit 1 (I believe that's the code).
Is there a way to make it so a chest is always full, but the user can only get it once? Like say Player1 goes into the chest, theres a piece of leather and a diamond and then Player2 goes into the chest at the same time and sees the same thing, then Player1 takes the items out, but for Player2 they are still in there....(sorry if its confusing)
@penguinbait
I agree. Also, still looking for help on my loot table issue.
Suggestion: Allow use of minutes/hours instead of just seconds
EX. set it to 1 SEC or 1 MIN or 1 HR
@dumptruckman
Suggestion: Make it so that chests won't restock if players are too close.
Fantastic plugin. Will be good when written books are recognised. My server has a maze system under the city with mob spawners and various traps, with chests that are restocked by your plugin. There are also a few hint books for the players, at the moment it depends on the player to return the hint book to an unprotected chest for the next person who finds the chest.
I like the idea posted below about having a book for new users to retrieve, could contain public warps, server commands, rules etc. Seems to be working for me with the dev version of 1.3.1
@dumptruckman
Hi can you make a text or video tut on making the chest random please?
@bloobubba
This is also relevant to my reply. Waiting two days to hear some good news about this...
After recently updating to 1.3.1 bukkit build, my chests arent restocking or anything, i am hoping that this can be fixed because this is essential to my minecraft apocalypse gamemode i am soon to be putting out on my server.