RestockIt
RestockIt
Note about Permissions
If Restockit has suddenly broken for you with 1.9.1, check the permissions and release notes below - OLD deprecated permissions (not used for 1.5 years) have been removed!
The restockit.chest.* permission has now been deprecated - see below! It still works, but will likely eventually cause issues (such as what I just mentioned)
About
RestockIt allows you to fill chests, trapped chests, hoppers, droppers and dispensers (plus whatever other containers you want to add) with infinite items, or with gradually refilling items.
It supports PermissionsEX and SuperPerms, with separate permissions for creating RestockIt chests and RestockIt dispensers.
If you don't use PEX or SuperPerms, RestockIt will automatically detect this and only allow ops to create RestockIt chests or dispensers.
RestockIt also has a blacklist, so you can prevent the use of dangerous or expensive items.
There is a major update in the works, which is an almost full rewrite; this will include things like enchantments, different items in one chest and more. I don't have an ETA for it, so the best I can give is "eventually" - I don't want to give a date to avoid disappointment.
How to use
To create a RestockIt container, create a sign above or below the chest/dispenser/whatever with the following syntax:
line 1: Anything
line 2: RestockIt
line 3: Item number or name
line 4: Delayed Restocking Information OR Anything
One sign is required per ccontainer, double chests only require one sign. However, if you place a sign above each half of the double chest, with different items on each, the double chest will be filled half-and-half with each item.
Additional Features
- As well as item ID numbers, internal Minecraft names can also be used, for example: stone or trapped_chest
- Items with damage values are fully supported, for example Lime Green Wool would be written as WOOL:5 or 35:5
- You can also use RestockIt as an Incinerator - just put Incinerator on line 3.
- Dispensers will automatically re-stock themselves whenever they are triggered - you don't need to open them.
- RestockIt supports Full Chest syntax as well as its own, so you don't have to re-sign all of your chests if you used to use Full Chest.
- To use delayed restocking, set the 4th line to:
- x Items, ys - this will restock one item every y seconds, until there are x items in the chest. (Alternate: xi,ys)
- x Stacks, ys - this will restock one item every y seconds, until there are x stacks in the chest. (Alternate: xs,ys)
- Rather than specifying time in seconds, you can specify it in ticks (20ths of a second), by not typing an s after the time.
- Remember to put a comma between the number of items and the delay, or it won't work.
- If you don't want to use delayed restocking, leave line 4 blank, or put anything you want in it.
- To use the blacklist, simply add items (number or capitalised name, just like on a sign) to the config.yml file in the RestockIt folder.
- Bedrock and TNT are blacklisted by default - you can remove these if you want.
- To add additional containers to fill, add items to the "singleContainers", "doubleContainers" or "dispensers" list in config.yml - they should be fairly self-explanatory.
- Unless there's a container you specifically want to use, I'd recommend leaving these alone.
Permissions
Permissions for PEX and SuperPerms are:
- restockit.container.create
- restockit.container.open
- restockit.container.destroy
- restockit.dispenser.create
- restockit.dispenser.open
- restockit.dispenser.destroy
- restockit.incinerator.create
- restockit.incinerator.open
- restockit.incinerator.destroy
- restockit.blacklist.bypass
Remember, you don't need PEX or SuperPerms to use RestockIt - It will automatically use op status if you don't have PEX.
Without a permissions plugin, *.open defaults to everyone, *.create and *.destroy default to ops, and restockit.blacklist.bypass defaults to nobody.
Also, you can use the opsOverrideBlacklist setting (set it to true) in the config.yml to allow ops to bypass the blacklist. (This is only really useful if you're not using a permissions system)
Planned Features
- A way to control how many items a chest can accept being put into it
- Ability to save current chest inventory, and restock that
- A system of accessing a main chest from multiple other "slave" chests
New to 1.9.2/3
- Fixed issue with deprecated permission detection for the blacklist
- RestockIt (hopefully) now works with Java 1.6
- Fixed exception when checking permissions under certain circumstances
Sorry for the rapid updates!
New to 1.9.1:
- [Bugfix] Permissions now work properly with new containers
- OLD deprecated permissions have been REMOVED
- New permission restockit.container.(create|destroy|open)
- Permission restockit.chest.* has been DEPRECATED (still works, but please change it...)
New to 1.9:
- Any container can now be used (set in config.yml)
- Trapped chests, droppers and hoppers now supported out of the box
- Items on signs no longer have to be all upper case
- General code cleanup (see GitHub if interested)
You can download Restockit from the button at the top right of this page.
The latest build is available at a wget-friendly link: http://dev.bukkit.org/media/files/768/478/RestockIt.jar
Source is available at https://github.com/xCP23x/RestockIt
RestockIt is open source, and uses the GNU GPL v2 license.
Special thanks go to Scott Marshall for code contributions and debug help.
@kahlilnc
I guess I could do something like that. I could either:
a) Make it so that each player is allowed to take a certain amount of stacks (or items) from any chest, and have that number slowly replenish over a certain amount of time. They can't take any more items until it does.
b) Allow each player to only open a chest once, then not be allowed to open it again for a certain amount of time. If they don't take anything, don't mark that chest as used.
In both cases, PermissionsEx could be used to determine players who can have instant refills and such.
Both of these are certainly possible, please tell me if you want me to add one of those (or something else) and i'll give it a shot.
@xCP23x Mmm not exactly. Well I guess this will use databases. Meh well I wanted to use this for events. Like allow only one person to access it once. So he cant access it again. Same with everyone else. Only access once then no more. But also maybe have a cooldown on to how long they can access again. :/
@kahlilnc
Do you mean that the player should be able to empty the chest, but it won't refill until someone who has permissions to refill it opens it?
Currently it does not do that, but it wouldn't be too hard to implement.
Please reply if that is what you meant, and i'll add it.
-xCP23x
Possible to only allow a player to access it once ?
Thank you!!! I love the Full Chest plugin but the non-OPs on my server were abusing it and I can't figure out permissions. Finally a solution.
@carbunkulous
Sorry, amending my description now. I was told that you were looking for someone to re-write it, and they gave me the code. Sorry if i've abused your licence, the info that was given to me was very limited and I assumed that it was open source. I'll remove the source from GitHub now, and hopefully we can work something out.
EDIT: Project is now removed from GitHub, project description and license updated.
EDIT 2: RestockIt has now been completely re-written from scratch, so i've open sourced it again.
Two problems:
Give credit where credit is due. You decompiled my code and released it. At least provide information that I was the original creator of this plugin.
Your license is not compatible with the source you grabbed it from. You have no rights to GPL my code.