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 Sep 16, 2012@kuwoobie
Im currently working on a plugin that will (soon) have the ability to regenerate written books. But currently it can only regenerate them if the server is not stopped.
-
View User Profile
-
Send Message
Posted Sep 13, 2012It would be great if this plugin supported written books. I tried leaving a guide book to my server in a chest at spawn, but a restocking chest wipes all the pages and turns it into a blank "written book."
-
View User Profile
-
Send Message
Posted Sep 6, 2012@dumptruckman
Okay... it's not working. When I do the first command, /cr default -w:MindEscape auto_create true, i get confirmation that it worked. But then as soon as one player takes the loot out of the chest, it's empty for the other players. And if I do a /cr check on the chests, they all say they're not enabled. So if I go /cr default -w:MindEscape enabled true, all the chests on the map are suddenly empty. Each time I have to reinstall the whole entire map to run further tests :-p
I don't know if it's a bug or if I'm doing something wrong... Sorry :/
-
View User Profile
-
Send Message
Posted Sep 5, 2012@dumptruckman
Thank you so much Dumptruckman, and thank you again Erwan for clarifying. I should be able to get it all done now. I would never have been able to figure out those commands on my own :-p
Many cheers and thanks for making a plugin that does just what I need. :)
-
View User Profile
-
Send Message
Posted Sep 4, 2012@MissPicket
Hey, sorry for the lack of documentation on this page. I've always hoped the comments in the config files and the help via commands would be sufficient. But yes, what you want is already possible, mostly. I believe this will be the command sequence you should execute to achieve it:
/cr default -w:MindEscape auto_create true/cr default -w:MindEscape unique true/cr default -w:MindEscape period_mode fixed/cr default -w:MindEscape period 86400/cr default -w:MindEscape restock_mode replaceHope this helps!
-
View User Profile
-
Send Message
Posted Sep 4, 2012Well okay
/cr default sets some default options for one world, like restocking itself every x seconds, or set all chests unique, or whatever options which are possible. Juste type it in the chat, you'll have some help about how to use it.
About what you wanna do, juste go to everychests, and do /cr create, one by one. Then when you wanna restock the chest for everybody do /cr restockall -w:worldname and that's it !
I hope you understood what I said :p
Bye
-
View User Profile
-
Send Message
Posted Sep 3, 2012@Erwandir
Thanks Erwan - that world is a pre-made adventure map that comes with the chests. I didn't create them - for the most part, I don't even know where they are because I haven't played the map yet. So what would be great would be to know the command (or config modification) to use to get all the chests in that multiverse world to be restocked chests. Without touching the chests on my main world, obviously.
I don't know what you mean by /cr default. I don't fully understand the global_defaults.yml file, nor the instructions up there ^. Sorry, i'm possibly a bit slow - I am used to configs though, but this one is not really clear to me :/
Thanks for your help :)
-
View User Profile
-
Send Message
Posted Sep 3, 2012Well if by map, you mean world, you can do the /cr default command ( I don't know if it will work with already placed and /cr create(d) chests ). Do a /cr check to check if what you've done have been aplied.
-
View User Profile
-
Send Message
Posted Sep 2, 2012Hi (again!)
So, if I understand correctly, it seems like your plugin CAN make all chests in a multiverse restockable. But I can't figure out how to get it done. I think your instructions need to be a bit more detailed :D
Any chance you could help me out? I have 2 worlds, 1 main world on which I don't want ChestRestock at all, and a second world, MindEscape, which is an adventure map with a bunch of chests placed throughout puzzles and mazes... etc. How can I set it up so that all these chests restock and all players that go through the adventure map have access to their content?
It would be even better if each player only had access to these contents once per day.
Could you please help me figure it out and do it properly in the config?
Many thanks!
-
View User Profile
-
Send Message
Posted Sep 2, 2012I'm looking for a plugin that would allow me to set all chests on a map as restockable. It's for multiplayer adventure maps. It would be quite awesome if someone made that! As it stands, I suppose I can use ChestRestock to go around the adventure map and set all chests to restock one by one, but it's so time consuming...
Anyhoo, maybe the developer will be interested in making an "all chests in world" option!
Cheers :)
-
View User Profile
-
Send Message
Posted Sep 1, 2012(Couldn't find how to send a Ticket :x ) How about adding the /cr set <type> <value> + <chest names> Could be very usefull in my case, I'm using only one world, so I do /cr create and I have to do /cr set , /cr set, /cr set each time >< So that's an idea, take it or not, I don't know if this will be usefull for other people.
By the way, great plugin !
-
View User Profile
-
Send Message
Posted Aug 28, 2012@markdf
Books belong to bookshelfs. ;-)
-
View User Profile
-
Send Message
Posted Aug 27, 2012@SharkROAR
I'm waiting for written books also.
-
View User Profile
-
Send Message
Posted Aug 27, 2012@dumptruckman
Glad to hear that :D
-
View User Profile
-
Send Message
Posted Aug 27, 2012@SharkROAR
In the future, yes.
-
View User Profile
-
Send Message
Posted Aug 27, 2012Will written books work in the future? At the moment they are empty when taken out of a chest.
-
View User Profile
-
Send Message
Posted Aug 26, 2012@DanishDude93
Yes.
-
View User Profile
-
Send Message
Posted Aug 26, 2012Does it work with 1.3?
-
View User Profile
-
Send Message
Posted Aug 21, 2012@Ethrock
To learn more about a property, type
-
View User Profile
-
Send Message
Posted Aug 21, 2012@dumptruckman
Oh cool. I tried taking the tabs out initially cause I thought that might have been an issue, I guess I missed a few. Things are working now and it's all sorted out. Thanks!
One other note though, I still do not know what values are allowed for "period_mode" which is currently set to player. I want it to restock based on a global timer, not based on a player timer?