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 first of all I would like to say this plugin really helps my server, and I enjoy it very much. However when I try to put a written book in the chest (my server has a small amount of dungeon quest in it) and after I type /cr set period # or /cr create it reverts the book to "Written Book" and whenever I open it it says *Error* in the book.
I am not sure what the problem is but I would like an answer to the solution, thanks!
Hey i am an owner of a gta server i need a plugin that restocks all the chests in the world for and can have percentages for a item! Please Give Me A Link For A Plugin Or update this one please!
Got it working, and i even added a config option, would you like to to submit a... I think they are called push requests? so that my code can be added the the github? Not sure how to make a push request, cause I don't have permission to just straight up push.
@dumptruckman
Thanks, I am on my way now. Found out how to use maven... lol this thing can get confusing. Currently figuring out how to compare the inventory type, to a chest and what not. Edit 1: Got my thing to compile, now i am going to bed... gunna test in the morning.
@Adondriel
Just type
in the project root directory. The jar will appear in a directory called target.
@Adondriel
So I made the changes, now how do I compile this so that I can test it?
@dumptruckman
yea, so that furnaces and anything other than chests are not included. Currently, my map has like 10 furnaces in each house, and I don't want users to be able to loot those. I use skript, to then cancel the rightclick event on furnaces but it is cause a large amount of inventory glitches.
Edit 1:Maven is seriously a pain in the ass to setup... I have no clue what i'm doing with maven, and now one of the files is missing for some reason Edit 2: Nvm, it magically showed up again... Edit 3: Why does it never find the correct dependencies?
@Adondriel
Interesting.. What do you mean exactly? Making it so you cannot enable restocking on furnaces?
@ChunkieMiner
The solution to your issue, is to experiment.
I'm working on making an option for disabling furnaces and things other than chests. Currently trying to setup my eclipse environment.
@KreatorB
well, for me it still does work perfectly fine, except for a small modification one of our coders did that fucked up loot in dispensers and stuff ... and thiiings
HOW CAN I MAKE IT SO THAT ANYONE CAN OPEN THE CHEST?? WHAT PERM
@Shado47
I agree, workign nicely and all options to use chest restock to make PVP/Hunger Games world this is it. Thank you
On 1.8.1 CraftBukkit Server with latest March update.... seems to be working
SPOKE TOO SOON: my config file has a trouble when I change names of the loottable name in the loot_table file and I created my own loot table and it can not locate the file.... ;-(
Works perfectly well on 1.8 Spigot. Good Job man! And lets keep in mind how much Mojang fked up with 1.8 (and this is a 1.6.2 release, not even 1.7) ... this plugin is really good. Thanks dude, you are awesome for creating this ^^
How can I use the loot-tables feature? I do NOT find much help with the config example, so please make a video tutorial or make a better config example and I suggest adding comments in the actual config file ( #For example this ) I'm trying to setup random per-player chests for a GTA server and I'm in need to know how the percentages range and how the config format should be, a complete tutorial will help a lot.
Thanks.
How do you make every chest in a map thats already placed a chest restock chest with out going to every chest and typing /cr create
Just tryed the plugin and it seems to work on CraftBukkit 1.8. It will be usefull !
Since this plugin doesn't seem to work with the current Versions (specifically Cauldron 1.7.10), I wonder if anyone has found a similar plugin that works?
I need a plugin that allows chest inventories to be unique per player, no refill option needed, to create treasure chests that everybody can loot only once.
Hello, I am not sure what to do, so the chests restock at every time a game ends
Hi, the plugin used to work perfectly fine for me but now its super buggy and half the time it doesnt work. I configure everything and it works, as in it saves it the correct way. But when I do /cr reload is takes all the items from my chests. I do /cr restockall and not all of the chests refill. I then proceed to do /cr restock too all my chests which is not a pain but its annoying since thats what the plugin should be doing. When I take items from the chests and re-open the chest it is supposed to restock it immediately, it doesnt do it at all. I have the chests settings set to its timed delay at 0 and 0 under global_defaults. I also have it set to player restock mode. Im confused why half the time it doesnt work and just deletes the items in my chests.