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.
@dumptruckman
I think you're right about me trying to change the chest file. I reinstalled the plugin, so i could start fresh. Seems to be working great now. love the plugin, and thanks for the quick response
@simplimazing
Sorry, you need to show me the WHOLE error for me to help you. But, if I had to guess, you tried to edit a chest file manually and you messed it up somehow. Please do not edit chest files manually. You need to use the "/cr set" command to alter their properties.
getting this error in the console over and over again.
at com.dumptruckman.chestrestock.DefaultChestManager.loadChest(DefaultChestManager.java:164) at com.dumptruckman.chestrestock.DefaultChestManager.initPolling(DefaultChestManager.java:67) at com.dumptruckman.chestrestock.DefaultChestManager.<init>(DefaultChestManager.java:42)
A very useful plugin indeed! God job! I rarely see so awesome plugins :)
@FireballCH @generilisk
Permissions should be fixed in the latest version.
The [FILTER] setting helps you search for commands. There's not a lot of commands. The ones listed on the 2 pages is it. For details on chest properties you must use /cr set. Example: You can use "/cr set" to get a list of properties you can set. Example: You can use "/cr set period" to get a description of the property period. Example: You can use "/cr set period 25" to make the chest restock every 25 seconds.
@Ragnoroth8965
I'm deleting your comment because it's ridiculously long. Please post information like that on something like www.pastebin.com. Also, try the latest version (2.2) as I've added some extra debugging to highlight redstone restocking. You need to make sure the chest property "redstone" is true.
@cmcintosh
This is added in 2.2 which is available now! Please read the new files it creates for details on setting up random loot.
@FireballCH None of the .* permissions seem to be working at the moment (CR version 2.0.3, Bukkit 2149, 1.2.5-R1.0) ...on that note, could we get an actual list of the permissions and commands, instead of the <cmdname> filler? It's a great plugin with what I see it doing so far, just wondering what else it can do that isn't documented.
@dumptruckman
gives the following:
What's the filter command? I'm confused. After a lot of trying things, I got
to output
followed by 4-5 blank lines.
Like I said, love your plugin, but don't really love your documentation.
This plugin works so well, we love it on our server, but there are some features that we would really like if they're possible to do:-
As I said before we're thrilled with the plugin, but these features really would be amazing!
Thanks, keep up the good work.
@dumptruckman
Hi, I changed my permissions system now to PermissionsBukkit, I had PEX before and I still got the same problem...

I really dont know whats wrong here...
@FireballCH
Hmm, if you are OP or have * then they should work. If you have that and they don't it's an issue with PEX.
@disciple218
Added them to the main page, thanks for pointing that out. Also, some of the permissions are only just added in 2.0.3 which is currently awaiting approval.
Great Mod is there a way we could add in the ability to provide a list of items and have the chest restock random or based on likely % drop?
Is there a page that lists the permission nodes? I can't seem to find them.
@dumptruckman
2.0.2 fixed it. Thanks.
Hi I got a problem with the permissions:
I got PEX and got all permissions, but it doesnt work.
What could be the problem?
Greetings
@convictedsaint
Try restarting your server instead.
I get this when I try loading it up. CB build 2126
2012-03-31 16:53:09 [SEVERE] Could not load 'plugins\ChestRestock.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException java.lang.NoClassDefFoundError org/bukkit/event/player/PlayerListener
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:148)
at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:305)
at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:230)
at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:207)
at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:541)
at org.bukkit.Bukkit.reload(Bukkit.java:182)
at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:22)
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:166)
at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:473)
at org.bukkit.craftbukkit.CraftServer.dispatchServerCommand(CraftServer.java:469)
at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:599)
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:568)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
Caused by: java.lang.NoClassDefFoundError org/bukkit/event/player/PlayerListener
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:41)
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.dumptruckman.chestrestock.ChestRestock.<init>(ChestRestock.java:24)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:144)
... 13 more
Caused by: java.lang.ClassNotFoundException org.bukkit.event.player.PlayerListener
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:41)
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 32 more
will download when i am on my pc. i am on my ps vita right now.
Nice plugin! Very useful indeed! (newbies wont complain that it is too hard for em :D )