If you want it to be filled with random items, just search it up, there are tons of threads similar to this already.
Wantsome909 hmm... http://forums.bukkit.org/threads/how-to-make-random-loot-chests-appear.140755/#post-1639098
chasechocolate not what i want. i would like a chest that all ready place down and it will get refill.
Wantsome909 once you put the block down, create a Chest variable: Code:java Chest chest = (Chest) block.getState(); Then you can add the items. I would recommend using a List<ItemStack> for the items that get put in the chest: Code:java for(ItemStack item : items){ chest.getBlockInventory().addItem(item);}
I'm not exactly sure what you mean. But trap chests have inventories too, so you can still use that code.