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.
First i like to thank you for making this awesome plugin. I'm using this in my DayZ style zombie apocalypse server, as a source of loot spawns in towns, military places etc. I'm using crackshot and this plugin together to make guns and magazines spawn in chest and it works fine.
Anyways, i would like to have loot tables for industrial places, to begin able to spawn building items for players to find for their bases. I'm trying to set loot for different color of wools, woods, slabs ect. Everything that has secondary data value, does not work.
ex.
So, how do i tell the plugin in loot_tables config that i wan't to use secondary value ? I tried to see what if i put blue wool in a chest and make it refill. What would the config look like ? This is the result i see:
That i found from the config of the chest i set to refill with blue wool 35:11 I see that the "damage" stands for secondary value, so i tried that in loot tables config, but it didn't work either.
So what to do to make secondary value items spawn from loot_tables config in to the chests ? Right format ?
i also tried 35:11 35;11 3511.. None of these doesn't work
great plugin only problem i have is i can not find where to define the worlds i am using it in currently it is affecting all chests across all worlds in 1 of my servers is there a spot in the configs where i may specify which world the plugin affects
@Blokizaki
Update: the "guest" player can now access the chest and see all the goldshovels (not sure why it started working), however, the player can take more than 2. Pretty sure I set it with a limit of 2. What did I miss??
Hi dumptruckman,
Nice plugin! I'm excited to use this on my server. I'm having a small problem right now and am not sure how to fix it. I setup a chest to give out gold shovels (2 max/player) and I have a Player that's the lowest rank of guest that when they open the chest it's empty. When I de-op and demote myself to guest and I open the chest, I can see all the gold shovels. I tested it before with a different player that's guest and they could access the shovels.
Can you help me out? Not sure where I went wrong . . . Thanks!!
I'm using ChestRestock Version: 2.3.1-SNAPSHOT-b100 & Craftbukkit 1.6.4 R2.
I don't see a Ticket System here so I guess I'll post my pastebins below.
loot table for goldshovel: http://pastebin.com/i0dHFSVE console log showing cached table (partial): http://pastebin.com/3rk840ci CR config: http://pastebin.com/sJYsfBJR CR global_default: http://pastebin.com/GBpKpBXY
Here's a screen shot of the chest and what appears with /cr check: [URL=https://imageshack.com/i/ns714ap][IMG=http://imagizer.imageshack.us/v2/150x100q90/c/856/714a.png][/IMG][/URL]
Hi there, I have 1.7.2 bukkit and for some reason it does not appear that the chests are restocking? I have set the chests with command /cr create, but when they are empty and I type /cr restockall it tells me that they have been restocked, but the chests are empty? Am I doing something wrong?
Hi dumptruckman,
First of all, amazing plugin its great!
Second, I was wondering if there is a way to make all naturally spawned chests to automatically setup to restock with the loot inside them, BUT to not allow chests placed by players to be set to restock.
Basically I want the dungeons(added by mods) to have restocking chests, but I don't want every chest added by a player, or currently already in the world, to be set to restock. Is this possible? and if so, how?
Thanks dumptruckman for the help i found the solution to the problem.But can you please help me how to change the period time for the restock i want to change it to two hours instead of 900 seconds.Can you please tell me what to type in order to do this.
@dumptruckman i did put version 2.3.1-SNAPSHOT-b100 but it still does not work.Can you please update the plugin and make it compatible with renamed items.Whenever i rename an item and put it in the chest and do /cr create it works then when i save and quit my server and start is again the renamed item disappears from the chest.
@Umar12
Make sure you are using version 2.3.1-SNAPSHOT-b100.
PLEASE HELP
I renamed ghast tear to silver coin and when i put it in the chest and do /cr create it works,but when i save quit my server and restart it again the item(silver coin) renames back to ghast tear in the chest.I don't want this to happen please help.
When I do /cr it says do /cr help for commands, and that tells me Invalid Command. When I do /cr reload, it says in green {0} is reloaded or something like that. Add another command or somehow fix it would be great, I would love to use this on my server.
@McPixel
to make it so they can only loot the chest once, just set the player-loot-limit to 1. I think that is what it is called.
@Adondriel
could you add a way to make it so you can turn the auto-create-chest on place on per player? My redstone player does not want the autocreatechest on, but my builder and chest placer does so that he can put down all of the chests, and not have to configure them.
Is there an option for loot_tables to make it so the items are not stacked? Like, I would like to have a random chance to give the player 4 gold, 5 gold, and 6 gold. But I want them to have to click on them individually. Could you add an option to make it place the items randomly in the chest?
@dumptruckman
ohh okay thanks dude :D
but can i edit the lore items ?
and how to make player loot at once per chest ?
@Tunix2
Unfortunately the best solution currently available is to set the loot limit to 0 and then give players the permission "chestrestock.bypass.lootlimit.CHESTNAME" where CHESTNAME is the name you set with "/cr set name CHESTNAME"
Is it possible to add a permission to a chest?
/cr set accesspermission chest1
@Molenbouwer
/cr set player_limit 1
@McPixel
Sort of... This would affect either ALL chests or ALL chests in a specific world. You would set the global defaults or the defaults for the specific world by changing auto_create to true and auto_create_new to true. This will cause ALL chests in a world (or on the server) to become chest restock chests. If you want them to have specific items in them automatically you would also need to configure a default loot_table
Anyone?
Hi, I absolutely love the possibilities of this plugin but I am having difficulties setting up the chest correct.
What I would like to have is a welcome chest that contains starter gear that doesn't refill for people. They can take out the items once and the chest shouldn't refill. Assuming I haven't changed anything in my config files, how would I setup the chest?
I put the items I'd like the newcomers to receive in the chest and type /cr create.
How do I go from here?
Thanks in advance!