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.
Any word on an update soon?
Running into a few errors here and there in 1.5, mainly with the /cr create command.
A simple recommendation that will save many from not choosing this plugin over others:
What if I want 1-5 gold ingots to be in the chest? I'd have to do 5 separate 50% chances. Make it so the amount can have 1-5 and not just one solid integer. [ Maybe even for the data number and enchantment level too ]
Other than that it's an amazing plug-in.
Is there any way to make all chests in a world use the properties instead of manually doing each one? Because I have WAY too many chests in a few worlds to be able to do them all one at a time.
I'm getting this error when doing /cr create with a newly generated config on build 99: http://pastebin.com/7yLBV9zc
Please help. We've got lots of creations that depend on ChestRestock on our server.
i also am gettingg the same issues with 1.4.7 when i create or update a chest with items i put in it gives me the error and the items aren't there tried restocking updating and everything but is i do a /cr disable the items are there.
Hello, I am getting this error when ever I try to use command "/cr create". When I do that I get this in console: http://pastebin.com/5QSTMt92 Chest does not open so it looks like it worked, but items get removed inside the chest after I type "/cr create". When I break the chest, I get items that were inside (but I couldn't see them.)
i tried to do the restock but when i set restock time to 0 it just restocked randomly??? what happened?
@jacob_vejvoda
It works pretty will with any version as dumptruckman has used the bukkit api (the way it should be). So it does not break with updates, generally. There are a few minor issues but they tend to come and go and are not constant.... I think they have actually been there for quite some time now though, just need to be fixed....
Is this updated to 1.4.7?
Permissions doesn't work, have tried chestrestock.*: true and chestrestock.cmd.*: true
I have similar problems when creating or updating a chest. I get the Internal Error message, especially on /cr update.
I found that if you don't put something in each slot of the chest and you try a /cr update it will return this error as if it's looking for something in each slot but can't find so it errors out with the Null Exception Pointer.
@CrYpT_Weed204
Is this working on 1.4.7? I'm getting the following error: http:pastebin.com/WMJsQcGS
first of all great plug in i love it everything almost works perfect. Just for some reason some chests are empty i got over 100+ chests on my server and 90% of them work perfect. just a few of them seem not to have contents in them even tho i did /cr create then /cr restock then i log out and log in and then the chest empty again.i even tried /cr restockall that seems to fill them up again then when i exit and come back same problem.
Is it possible to have ranges in amount for items? For instance:
amount: 2-5?
@Blade2424
@sk3tch2
hey guys, loot tables are easy to figure out, just skim through the commands, i believe you add a chest to loot table with /cr set
Your plugin is perfect and unique, yet still surprisingly the most recently active. I would certainly love it if you made an update for 1.4.7, correcting previous bugfixes with the new jar, and updating the custom item naming ( not just books, but items too. )
My server depends on this! I cannot revert to another plugin, it just doesnt feel the same! :D
-Yolju
Update for 1.4.7?
i will be trying this plugin out, seems really great, something you might consider adding is a feature that does the following:
-Allows resetting within certain regions only -Allows randomizing of loot according to specified parameters inside each region
I mean to say, making a region where only leather, wood and basic items spawn. And then maybe in a different area you can find up to diamond. I am trying to implement this into dungeons
Is it possible so when you open the chests it takes money away from you? that would be a pretty good idea..
Awesome plugin, it saves us a lot of time refilling loot chests in our role-play map!
It would be perfect, if not for 2 things:
- written books don't work (mentioned before, hope they can get it to work);
- named items are reset to their original name (the enchantments stay).
It's a pity the named items are reset, I've made a bunch of "unique" items, set items, ... to go with the RP style, so I would love it if this can be fixed. Thanks! ^.^
Ignuz from IndieSquish.com