This is the source to my bukkit plugin Inventory Helper found here: http://dev.bukkit.org/bukkit-plugins/inventory-helper/