timvisee/DungeonMaze — pull request #7 by Xephi (2012-11-21 00:52:20+00:00)
Title: Finalise DMGenerationChestEvent

Tested with this little plugin :
https://dl.dropbox.com/u/60299638/ChestDiamond.jar

This plugin from me ,change all of Generate Chest content to a single Diamond
(that's an example)

here is the source from my listener :

```java
@EventHandler (priority = EventPriority.NORMAL)
public void onChestGenerate (DMGenerationChestEvent event) {
event.setCancelled(true);
Random random = event.getRandom();
Chest chest = (Chest) event.getBlock().getState();
List itemStack = event.getContents();
itemStack.clear();
itemStack.add(new ItemStack(Material.DIAMOND, 1));
event.addItemsToChest(random, chest, itemStack);
}
```

Xephi