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.
@MajorCyto
Not yet, I'll add this once book api is available and I can actually retrieve what's in the book.
Can this plugin, also copy/clone written in books. Will it replace it with a un-signed book or the signed book? Can it read the NBT data, or does it use the ItemClone(). feature?
I was thinking about making a starter book of information, that players can grab from the chest.
@dumptruckman i read it and i dont under stand how to make it work in game and how to even code the config can you help?
@dumptruckman
When I put the loot table "givingtree" as part of the "loot_tables.yml" file, it gets deleted when the server restarts, and is just the original file with the set of instructions.
@dumptruckman
Yes, it's a seperate .yml even. I created the loot table, and infact, NONE of my chests will restock, even if they are not relying on a loot table. Our basic starter chest does not restock anymore. It would be apparent your plugin does not properly work with 1.3, it requires a fix.
Also, when you type in /cr set restock_mode it simply says it requires "a word". Doesn't tell me which words are acceptable strings. There are many values that have this.
@Ethrock
That's not possible yet but it's something I can consider.
@Ethrock
You can type /cr set restock_mode (without a value) for a description of the property.
@Ethrock
Hmm... Did you set the loot table for the chest to "givingtree"? Also, is it in a separate file or part of loot_tables.yml?
@zToMx
Read the files included with the plugin. I hope to have more descriptive instructions available soon.
@dumptruckman how do i make the chest random please help thanks
Is someone able to explain to me what is wrong with my loot_table for this item? The result I want:
3 items total in the chest, randomly selected using the lists and chances of getting the items shown in the table.
What I get: Nothing. The chest never, ever, EVER restocks. With anything. Ever.
Here is my code:
@dumptruckman
I have it running on my 1.3 server atm. I love this plugin but I don't know how to modify the files, or set things up extensively. How do I set a chest up to only restock when players have removed items? I don't want it to wait until it is empty, but if only 1 out of 4 items have been taken, only restock that one item.
Can someone link me to an actual help file? What the hell do I enter for the properties for restock_mode, or any of those other things? I can't get any help info on them anywhere.
@TheLoneWolf85
So... What is the error exactly?? If it's something in console please paste it on www.pastebin.com
@markdf
I may consider it.
Great plugin! Would it be possible to add a players name into the global message when the chest is opened?
@dumptruckman
At the Time of having this happen, I only had CoalToDiamond, BurningMobs, ChestRestock....
I've since grown into more plugins... I haven't ever gotten the error unless holding shift to Place/Take things out of dispensers/Chests that are set with Chest Restocker (if I disable the chest from restocking I don't have the error) I figured it's something to do with placing a 'stack' as that's all Shift does, if I don't hold Shift while stocking/taking from these ChestRestock set containers, No Error... lol Haven't had a problem in quite a long time with it, I have just been cautious.. It may also be something in the OP settings as I haven't noticed if it occurs to the players taking things out.. Only when I am setting containers up for events and such. Sorry if I repeat myself to much, I'm going on little to no sleep at the moment. Take care, and sorry I'm not much help. Still a great plugin! xD
@dumptruckman
Excellent, it sounds like just what I want! I will give it a go. Thank you for your speedy response and the plugin, much appreciated.
@Rawker31994
It's probably fine for 1.3 though I haven't tested it. 1.3 broke very few plugins.
I've loved this plugin since the moment I downloaded it! Is the update for 1.3 ready on this so it doesn't break? I'm looking forward to having it on the server again.
@thejohnnyg87
Ahh, yes, good point, I've added it to the feature list.
But yes, each chest can have different settings including different loot tables.
So with this, each chest can have unique settings? Such as different refill timers and different items? Can I set each chest up to have different lists of items they will randomly refill with?
Sorry if you've already answered this, but I was not sure from the plugin description if unique settings could be established for each chest.
@bhommie123
Read about the changes in version 2.3-SNAPSHOT-b63 http://dev.bukkit.org/server-mods/chestrestock/files/16-2-3-snapshot-b65/
What do you mean refill with better items? It all depends on how you set the chest up. You can put different stuff in the chest and use /cr update to make it restock with the new stuff.