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.
-
View User Profile
-
Send Message
Posted Apr 5, 2013@zrocweb
I don't have LWC
-
View User Profile
-
Send Message
Posted Apr 5, 2013Looking for a similar plugin for my Survival Games, is it possible to make it restock by radius of chests on each server restart?
-
View User Profile
-
Send Message
Posted Apr 5, 2013@madbushyjosh
You opened a blocked chest is a message of LWC.
-
View User Profile
-
Send Message
Posted Apr 5, 2013@xpto2011
Unfortunately that is not possible yet, if you're meaning for a loot table. You can put an enchanted book IN the chest and set it to restock but that's all it supports for now.
@madbushyjosh
This would not be ChestRestock.. afraid I don't know which plugin could be causing this though.
-
View User Profile
-
Send Message
Posted Apr 5, 2013My players are able to open chests that are being blocked above by a block due to this plugin, creating the message like: "You are opening a blocked chest"
If this IS to do with Chest Restock then is there any way to disable it? If NOT to do with Chest Restock and you know what the problem is can you help?
EDIT: No message appears, that's just an admin thing for normal chests. The message doesn't appear for Chest Restock chests, even for admin, it just opens as if normal without the animation.
-
View User Profile
-
Send Message
Posted Apr 5, 2013@dumptruckman
and how can i create a enchanted book now? what structure have i to use?
-
View User Profile
-
Send Message
Posted Apr 5, 2013OKAY! Great news everyone. After thinking for a very long time that the bug was much more complex than it actually was I finally got it fixed. This isn't the rewrite but just a fix for the bug in b99. I still plan on rewriting the plugin but as I said previously it's going to take some time.
The fix is available in 2.3.1-SNAPSHOT-b100 which is available in the files section.
UNFORTUNATELY the restock contents of chests already set will probably be wiped and you will have to set them up again. Sorry about this! I think if you were using the UNIQUE setting for the chests and you go and wipe your chests folders before using the new version you may not have to put stuff into the chests again.
On the plus side, item's ItemMeta should ALWAYS work now. So books and things of that nature should always store properly, hoorah.
-
View User Profile
-
Send Message
Posted Apr 5, 2013@dumptruckman
Sweet. Than I won't do anything and will wait for your update. I hear ya on the time factor... always an issue.
-
View User Profile
-
Send Message
Posted Apr 5, 2013I am working on a rewrite at the moment but I just have much less time to do development work these days. Sorry guys.
-
View User Profile
-
Send Message
Posted Apr 5, 2013@Wreyth
I don't think it's dead. Just not really updated in awhile. I am thinking about making a new chest restock plugin loaded with more options, so stay tuned
-
View User Profile
-
Send Message
Posted Apr 5, 2013this was by far one fo the best and widest used plugins but sadly this seems to be dead now as we can't get any updates for a long time and no support from the dev.
R.I.P Chest Restock
-
View User Profile
-
Send Message
Posted Apr 3, 2013@l4pierce
Change the player limit. If it's kept at the default of one, then that will be the reason. Change it to unlimited or 20 or something and they should have no issue seeing the inventory each time it's replenished. U also need to check your loot table settings
-
View User Profile
-
Send Message
Posted Apr 3, 2013@Vinsenseable
The problem is that your entire chest needs to full. For some reason there is a bug in the plugin. it does not happen all the time, but if you put one item in each slot of the chest and then issue a /cr create it will work...
-
View User Profile
-
Send Message
Posted Apr 1, 2013Doesnt work for 1.5.1. Give me this when I do /cr create
<<code org.bukkit.command.CommandException: Unhandled exception executing command 'cr' in plugin ChestRestock v2.3.1-SNAPSHOT-b99 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:187) at org.bukkit.craftbukkit.v1_5_R2.CraftServer.dispatchCommand(CraftServer.java:523) at net.minecraft.server.v1_5_R2.PlayerConnection.handleCommand(PlayerConnection.java:967) at net.minecraft.server.v1_5_R2.PlayerConnection.chat(PlayerConnection.java:885) at net.minecraft.server.v1_5_R2.PlayerConnection.a(PlayerConnection.java:840) at net.minecraft.server.v1_5_R2.Packet3Chat.handle(Packet3Chat.java:44) at net.minecraft.server.v1_5_R2.NetworkManager.b(NetworkManager.java:292) at net.minecraft.server.v1_5_R2.PlayerConnection.d(PlayerConnection.java:113) at net.minecraft.server.v1_5_R2.ServerConnection.b(SourceFile:35) at net.minecraft.server.v1_5_R2.DedicatedServerConnection.b(SourceFile:30) at net.minecraft.server.v1_5_R2.MinecraftServer.r(MinecraftServer.java:580) at net.minecraft.server.v1_5_R2.DedicatedServer.r(DedicatedServer.java:225) at net.minecraft.server.v1_5_R2.MinecraftServer.q(MinecraftServer.java:476) at net.minecraft.server.v1_5_R2.MinecraftServer.run(MinecraftServer.java:409) at net.minecraft.server.v1_5_R2.ThreadServerApplication.run(SourceFile:573) Caused by: java.lang.IllegalArgumentException: Cannot copy null stack at org.apache.commons.lang.Validate.notNull(Validate.java:203) at org.bukkit.inventory.ItemStack.<init>(ItemStack.java:120) at com.dumptruckman.chestrestock.DefaultCRChest.update(DefaultCRChest.java:113) at com.dumptruckman.chestrestock.DefaultChestManager.createChest(DefaultChestManager.java:205) at com.dumptruckman.chestrestock.command.CreateCommand.runCommand(CreateCommand.java:33) at com.dumptruckman.chestrestock.command.TargetedChestRestockCommand.runCommand(TargetedChestRestockCommand.java:36) at com.dumptruckman.chestrestock.pluginbase.util.commandhandler.CommandHandler.checkAndRunCommand(CommandHandler.java:234) at com.dumptruckman.chestrestock.pluginbase.util.commandhandler.CommandHandler.processFoundCommands(CommandHandler.java:120) at com.dumptruckman.chestrestock.pluginbase.util.commandhandler.CommandHandler.locateAndRunCommand(CommandHandler.java:70) at com.dumptruckman.chestrestock.pluginbase.util.commandhandler.CommandHandler.locateAndRunCommand(CommandHandler.java:48) at com.dumptruckman.chestrestock.pluginbase.plugin.AbstractBukkitPlugin.onCommand(AbstractBukkitPlugin.java:141) at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44) ... 15 more
<</code>>
-
View User Profile
-
Send Message
Posted Apr 1, 2013This plugin is confusing me. How do I make it where its player specific inventories and the players can loot the chests once?
I thought I had it, but the players cant see the items in the chests.
-
View User Profile
-
Send Message
Posted Mar 29, 2013Love the plugin, keep it up!
-
View User Profile
-
Send Message
Posted Mar 27, 2013Awsome plugin, One suggestion: Can u make it work with books? :D
-
View User Profile
-
Send Message
Posted Mar 26, 2013@Beauseant
No, it wipes books and any other items with names/lore other than the default.
-
View User Profile
-
Send Message
Posted Mar 26, 2013Does this plugin also support a way to restock written books? Please tell me.
-
View User Profile
-
Send Message
Posted Mar 23, 2013Is it possible to make it so you can remove the global message?