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.
I'm having the same problems too.
Like some others I'm running into the issue of chests being empty whenever people go to loot them. I read in one of the config files this may have something to do with our Java garbage collection settings? If that's the case, what settings should I use for that to fix the problem?
Thanks
Does this work with QuickShop plugin?
http://dev.bukkit.org/server-mods/quickshop/
If i make a chest with stuff in it for sale, then use /cr create <- to create the chest to be refilled, does it work?
error on restart.
http://pastebin.com/Mi4BuH22
using b100
going to test something, may be a bukkit version issue.
@hatanu
Same problem,
This server is running CraftBukkit version git-Bukkit-1.5.1-R0.1-21-g49b0699-b2754jnks (MC: 1.5.1) (Implementing API version 1.5.1-R0.2) ChestRestock v2.3.1-SNAPSHOT-b100
all chests empty
With latest snapshot:
/cr check 22:25:47 [INFO] ..... issued server command: /cr check 22:25:47 [INFO] [ChestRestock-Debug] Searching for ChestRestock chest at -76_74_-145_World 22:25:47 [INFO] [ChestRestock-Debug] Got cached chest at -76_74_-145_World
/cr restock 22:26:40 [INFO] ..... issued server command: /cr restock 22:26:40 [INFO] [ChestRestock-Debug] Searching for ChestRestock chest at -76_74_-145_World 22:26:40 [INFO] [ChestRestock-Debug] Got cached chest at -76_74_-145_World 22:26:40 [INFO] [ChestRestock-Debug] Getting inventory for: null 22:26:40 [INFO] [ChestRestock-Debug] Got non-unique physical inventory 22:26:40 [INFO] [ChestRestock-Debug] Clearing inventory before restock 22:26:40 [INFO] [ChestRestock-Debug] Restocking org.bukkit.craftbukkit.v1_5_R2.inventory.CraftInventory@222978f1
cat -76_74_-145_World only_restock_empty: 'false' redstone: 'false' name: '' loot_table: '' period_mode: player items: 0:t:339;#:64/1:t:339;#:64/2:t:339;#:64/3:t:339;#:64/4:t:339;#:64/5:t:339;#:64/6:t:339;#:64/7:t:339;#:64/8:t:339;#:64 unique: 'true' preserve_slots: 'true' restock_mode: replace global_message: '' lastRestockTime: '0' accept_poll: 'false' indestructible: 'true' players: PlayerName: lastRestockTime: 1366057524861 restockCount: 4 period: '60' player_limit: '-1' enabled: 'true'
with command /cr update i get something like this in the chest yml
items: - ==: org.bukkit.inventory.ItemStack type: AIR - ==: org.bukkit.inventory.ItemStack type: AIR - ==: org.bukkit.inventory.ItemStack type: AIR - ==: org.bukkit.inventory.ItemStack type: AIR - ==: org.bukkit.inventory.ItemStack type: AIR - ==: org.bukkit.inventory.ItemStack type: AIR
All our restock chests are empty and they won't restock. Their data seems to be intact in the file, but doing restockall isn't doing anything!
Can I like create a chest for everyone? So when 1 person takes the loot out of the chest, its gone for everyone till it respawns?
Gr Erik
If I add an enchanted book with an enchantment on it to a chest and set the chest it restocks as a blank enchanted book. If I edit the actual chest to include a book with the enchantment, it turns into an unusable enchanted book with the enchantment, any idea what I should do?
Ok so can someone help me say i have a item that is gold and i want to call it a coin so i rename it [Coin] Chestrestock will turn it back into a nugget how to i fix this
@dumptruckman
@WINFAMILYSURVIVAL
Modded items work just fine. You just need the id.
lets say the ore was 173:12
That works just fine
Sometimes chests restock with nothing in them, how can I prevent that?
yay just when i had given up hope , glad to see a great plugin didn't die like so many have. and yes i understand the whole time thing.
thanks for the update me and my players thank you as there is allot of chests that make use of this as well as dispensers
@WINFAMILYSURVIVAL
Unlikely. These chests support everything Bukkit supports for serialization, no more, no less.
Hi all, Ive been trying to use this plugin with Voltz, and whilst in the whole it works for me, I do have problems using some of the additional ores used in voltz, whilst it accepts the ores and items I put in chests ready to re-stock, when the restock takes place it changes many of the ores to obsidian instead of the original ores that were present.
Is there any way of adding additional item I.D's etc that it will work with.
Thanks in advance
Ellis
Thanks for update :)
Awesome plugin! But i see its missing a logo if you want a logo i can make you one for really cheap you can either PM me or look for deatails here http://hardc0relogos.webs.com i can give you a really good deal because I am going to use this plugin!
What if I want a chest to restock as soon as the chest closes and the items are taken from it? Or just want to set my own time? Somebody PLEASE respond im in a hurry.
@diannetea
No, the edit on my post shows I know what that is. Thanks for checking anyway. The problem is that ChestRestock allows me to open only ChestRestock chests when there are blocks above them, and I can't stop this feature.
Thank you so much for updating this.
@madbushyjosh
Have you tried googling the exact message? lol nevermind I found it in like 2 seconds
http://forums.bukkit.org/threads/opening-chests.94585/