Bukkit/CraftBukkit — pull request #1167 by shjohnson-pi (2013-06-04 17:25:36+00:00)
Title: [C] Add BlockFormEvent for Water. Adds BUKKIT-2374

**The Issue:**

Plugins can't stop infinite water sources. (2x2 area of water sources never depletes)

**Justification for this PR:**

Water creation now emits a BlockFormEvent that can be cancelled.

**PR Breakdown:**

If new water is being formed, call the BlockFormEvent. If it is cancelled, reset values
to before the event. (The actual creation is later in minecraft code)

**Plugin Example:**

```javascript
@EventHandler
public void onBlockForm(BlockFormEvent event) {
Block block = event.getBlock();
BlockState state = event.getNewState();

if (state.getType() == Material.WATER) {
event.setCancelled(true);
plugin.getLogger().info("Canceled water event");
}
}
```

**Relevant PR(s):**

(By ticket creator Ben Stern, results in 404)
https://github.com/Bukkit/CraftBukkit/pull/877

**JIRA Ticket:**

BUKKIT-2374 - https://bukkit.atlassian.net/browse/BUKKIT-2374