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.
Hello, there seems to be a glitch in the system.
When I try adding leather pants or boots they just come up as air.
Its okay if it's grouped with other items but if you try a definite give for the player the whole loot table becomes air every time. Possibly when you get a chance, fix this for us, I really like this plugin and it would make my day if its fixed as a bug fix to the plugin. Thank you for reading :3
Hi, i just tested this plugin but i have one Problem. the file with the global settings restores every time when i changed it. what can i do ?
This sound stupid, but how do I target a chest other than having my cursor over it...
You can't.
I haven't tested this plugin yet but does this plugin allow you to create loot tables then link the tables to chests? Also can you add coloured named items as well as enchanted items? Also are you planning on continuing this plugin?
@dumptruckman
Do you know of any other plugin with similar functionality?
@mormaii2
This plugin doesn't prevent the looting of the chest right now. It will simply NOT restock if they have already looted it.
Ok so what I want to do is create a single chest from which people can only loot 1 random item every 2 hours. If they try to loot their item again before the 2 hours they arent allowed. Is this possible? I want to give players a random reward every 2 hours.
@Rathard
I believe you want
@mormaii2
Yes. You need to set the period to 7200 (2 hours), make it unique and then set up a loot table for it.
According to the description, Am I able to create a chest that restocks automatically after 2 hours with random items and that withing the 2 hour period only players will be able to loot it once each person?
So is there a way to delete items that are already inside a chest so the items that you have restock don't mix with the items that are already in the chest?
@CraftMastaaaa
It should technically work with any type of inventory block. The exception is that the "unique" property only works on chests.
@mrcn138
This plugin depends solely on Bukkit. Minecraft updating typically does not break compatibility of Bukkit plugins. If it does, then yes, I will be updating it for 1.6. Chances are it will not and there will only be an update for new features.
Will you be updating this plugin to 1.6? I sure hope so because I LOVE this plugin!
Hey there, looks like a great plugin might be what I need for an RPG world :D Does this by any chance work with dispensers or any other containers? If not would you consider adding that? :D
Thanks
-Craft-
Oooh, I'm super stoked. The latest dev version ALSO lets me put written books in there, and saves the content <3 <3 <3
This plugin rocks. Thanks so much, man!
@DBZfan2000
Latest version does this... (b100)
@Davyhalliday
This is a good idea. I'll have to add this when i get some time.
@KillerAnt9000
I'm glad you were able to figure it out ;)
New: Added new chest default 'auto_create_new' which when combined with 'auto_create' will allow for all existing chests in a world (or globally) to be automatically set up as if created with "/cr create" but not chests that are created by players once this option is enabled! (This will allow for admin's to essentially have "/cr createall". The default setting for 'auto_create_new' is false. To have the "create all" effect for a particular world use the following command "/cr default -w:nameofworld auto_create true".
I FOUND OUT!
1. First fill your chest
2.Run This Command /cr default -w:<Your World> auto_create ture
3. Enjoy Every Chest In The World Restock!
@zrocweb
Thats not what I meant. Currently im useing ChestRegen and it cause major lag! I want to switch to this one for performance but I dont want to have to go to 200 chest and do /cr create. I want to know how to auto restock every chest in a selected area or world and set them all to restock at 6 minutes. Also is there a way to make it so each chest is for each player? Like when a player grabs items from it and another player comes a grabs from it they both get the items.
Could you possibly make it so that this chest could restock custom items with names and lores? If you could that would be awesome. :)
@KillerAnt9000
point to the chest you want to create as a restockable chest and type /cr create
to check the settings for that chest type /cr check
to edit the settings for that chest type /cr set setting value.....