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 have a pvp hunger games style server that is pretty dependable upon this plugin. I am paying money for this server, and it at the moment it is inoperable because this plugin isn't working properly. Just want to know if it will be updated/fixed, or should I find another similar plugin.
An issue with 1.4.2
people take something from a chest. To them, it looks like they have the item. When I check their inventory, it shows they do not have the item. If its steak, for example, they will try to eat and can not. When they log off and back on, it disappears. So basically even though it shows they took the item, and to them it shows they have the item, they do not have the item.
I have a pvp hunger games style server that is pretty dependable upon this plugin. Just want to know if it will be updated/fixed, or should I find another similar plugin.
Great plugin though, love it
How would one create a chest for people new to your server containing a set of starter gear that they can only loot once?
I would love book support to. Hopefully renaming items in 1,4 with anvils will work too.
update please!!!
So I am having an issue on my server with this. When a person dies on the server, all the chests appear empty for that person until they are reset, even when the chests have items in them....help?!
Please update this plugin to support written books! Thank you. Also, sometimes chests seem to become 'empty' or wiped of their items (even from the config file). Is this a known issue with the plugin?
As a suggestion, maybe an ability to put chests in a 'group' so that you could restock chests assigned to specified groups?
@dickwick
Anything that implements http://jd.bukkit.org/apidocs/org/bukkit/inventory/InventoryHolder.html will work. Perhaps some kind of bridge mod could be made to make this the case but it I will not be making such.
Is possible to make this work with custom chest items from industrial mods? (Iron Chests etc..)
how to add potions to chests?
Anybody know if this works with 1.3.1 or if it breaks it?
Just a couple things.
1- Make it a option to make chests to despawn and spawn ssomewhere else. Like we target 2 places where it can spawn and once one is looted it despawns and then spawns in the other place after x time.
2- Also how to make potions a loot in the chests?
I have a suggestion, could you make this work for furnaces & dispensers aswell?
I am so sorry - I have been incorrect with my last post - I have been hit with so many errors when I updated jre 7u7 and I got you mixed up with another plugin.
i should of known - becuase your plugin has never given me any problems.
Please accept my apology for my negligence.
@Jerjzu
wtf
Can someone please explain me step by step how to setup a chest so it restocks according to a loot table. I have my loot table saved in proper folder and even copied that to the loot_tables.yml but I'm not sure what I'm doing wrong. I was googling it and it seems other are having trouble on this matter as well.
@Jerjzu
I really don't understand how this is related to ChestRestock. Perhaps if you showed me the entire error. Use www.pastebin.com for long pastes.
Sorry - My bad !
option to /cr create all chests within a defined area?
Any chance we can have the global message support the colour codes? e.g.
global_message: '&3[The Haze] &f A chest in the Haze has been restocked with Treasure.'