Can you limit the types of items allowed in a container?

Discussion in 'Archived: Plugin Requests' started by dunbaratu, Jul 15, 2013.

  1. Offline

    dunbaratu

    I just got done searching the plugins for something that does this and I don't *think* I was able to find one that does exactly this:

    You make a container, like a chest. Then you configure it in some way - using a sign or a "/" command or maybe another controlling container - to tell it which items its allowed to hold. Any attempt to deposit an item not on the approved whitelist fails and the player who tried doing it ends up just keeping the item in inventory.

    For example, you could make a chest that refuses to store anything other than diamonds. Or make a chest that only will hold iron or gold ingots.

    Why is this useful? Because while there's lots of interesting redstone machinery people can make to do all sorts of interesting stuff based on how MUCH is in a container, and this can be used to make donation boxes and "entrance fee" mechanisms, this does no good if the players can just throw any random junk they feel like into the container. "Hmm you wanted me to donate gold to enter this room? Ah here have some zombie flesh instead."
     
  2. Yeah I know that this can be annoying. I created a plugin called GrandExchange, you MIGHT find it interesting. In the plugin, players can create a slab shop. When other players buy from it, a redstone signal is emitted, so a door can be opened, or anything else could happen. The shop could just hold a bogus item, like a gold ingot or a stick (I like paper!) and the shop will have the price needed to enter the door. It's quite easy :) many players on my server use this mechanism for entrance fees to spawners, anvils, rollercoasters, etc.
     
  3. Offline

    dunbaratu

    Thanks this looks like a good mod. I won't be trying it right away as I don't currently use Vault, and so the dependencies to make this work require I do a lot of research. (I don't like installing mods that I don't fully know what they do and how to configure it to avoid exploits, so when a mod I want has a large mod dependency list then I tend to back off and wait for a more major update first (i.e. like 1.6.2) before doing the mod.).
     
  4. Offline

    dunbaratu

    Since I didn't find a plugin that was exactly what I wanted for this, I made my own. This is my first foray into making a bukkit plugin so I expect I'll have to go back and rework it to fit with standards if I want to release it but... it DOES work now.. yay.
     

Share This Page