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.
Is there any way to detect who activates redstone and only restock the chest for that player when the chest has unique = true?
http://tinypic.com/r/2yytg85/6
that is everything your instructions give me
@Wreyth
Please reread my instructions for what I needed. The screenshot you posted is insufficient. Sorry.
ok did i configure them right or what?
for over 80 chests its the same
http://tinypic.com/r/o722pj/6
@Wreyth
Umm, please target a chest having this issue and type /cr check, then press enter to open the chat screen and take a screenshot. Do that or www.pastebin.com what is in the file for that chest if you can identify it.
any updates on the issue of it restocking with every /reload or server restart?
Hey guys i made a toturial if you are having problems http://www.youtube.com/watch?v=rzCLUK_Vvqs&feature=plcp
@dumptruckman
Wow, Thanks for addressing that! I'll run that on my server for a while and see if that works!
b63 (http://ci.onarandombox.com/job/ChestRestock/63/ until available here) introduces a workaround for the StackOverflowError some people were having. It also adds the ability to "create all" for a world. Read more about this below.
@Jknies @TheLoneWolf85 @HunterWolf105
Okay, what is going on here is that CraftBukkit has a faulty implementation of "virtual" inventories for NON-CHEST inventory blocks (so furnaces, dispensers, etc) and when someone shift-clicked an item in one of those virtual inventories... BOOM, server crashes. To fix this I have temporarily disabled the ability to have unique inventories for those type of blocks... (though it will still work for chests!) Once there is a fix in CraftBukkit I will re-enable this feature.
@Mayhem777
This is fixed in the above version... chests should "disable" themselves when destroyed.
@Jknies
Regarding the 0 period, this will cause it to never restock based on time. If you want it to restock just once per player there is always the player_limit option.
@FaceFlip
Okay, this is finally possible in the above version. It's pretty simple but perhaps hard to understand... The most simplest way to explain it is to use the command "/cr default -w:worldname auto_create true" This will cause all chests in the world "worldname" to be configured as a restocking chest (with whatever is in them at the time) when a player opens the chest. Due to the extra option 'auto_create_new' added in this version, this will NOT affect new chests created by players! If you were wanting it to affect chests players build, simply do "/cr default -w:worldname auto_create_new true". Please keep in mind this doesn't immediately set up every chest to restock, it sets them up as player's open them.
@dumptruckman
No loot tables. In my very unprofessional opinion it seems like: I am trying to use 0 for my restock time, as I want all players to be able to only check the chest once. When someone takes it from the chest it seems like it is trying to restock it, every 0 seconds, or infinitely until it kills the server. When I do /cr check, it says it will restock every 0 seconds, is that correct for a chest set to not restock? Am I setting this up wrong? List of plugins on the way, hope this was helpful.
having a nice huge issue...... i have over 70 chests set to restock once a week but whenever the server restarts or you do a /reload it restocks all of them...... i have some rich players on the server at the moment
@Jknies @TheLoneWolf85 @HunterWolf105
A list of your plugins would be very helpful. Also, are you attempting to use loot tables?
I am getting the same problem as HunterWolf105
Any way to delete chests? if i destroy them when i put another it get the same config ... so don't get deleted
@JakeS17
While targeting a chest:
Don't include the .yml if the table is in its own file.
@labouche10
While targeting chest: /cr disable
@Flubausterus
Don't include this in the id field. Instead, it requires another field called "data" so you'd have
But I think I will add a way to do it on one line in a future update.
@FaceFlip @FaceFlip
This is actually a quite hard thing to do correctly but I think I finally have a solution which I will be adding in soon. :)
@azilgath
Yes... Please look at loot_example.yml for how all the fields should be formatted... You made up quite a few. Id is the type, and the enchant requires a whole separate section which is shown in the example file.
@TheNoobThat
Please explain in more detail what you mean because I don't understand what you're requesting.
@Master_Zangetsu
I'll be writing a more detailed guide tonight.
@TheLoneWolf85 @HunterWolf105 This is quite odd.. I'll have to see if I can reproduce somehow. Can both of you give me a list of the plugins you are running?
@HunterWolf105
I think I found something related to that! It could be when somebody is holding Shift to move a stack from inside the 'restocking' container, to their inventory, or the other way around, into the restocking container... I have found that people cant hold shift to Click a stack to move it, from a dispenser (monster eggs) I was setting up a challenge :> and I got that error too. Perhaps somebody is trying to loot the restocking chest faster by holding shift??
Would have to ask dumptruckman, if he can repeat the errors :/
Sorry I don't have anything else but that...
@Master_Zangetsu
It isn't, fairly straightforward, good owners will know and take the time to set it up.
- xDrapor
this plugin is far too confusing.