Bukkit/CraftBukkit — pull request #835 by Anxuiz (2012-08-03 22:22:47+00:00)
Title: Fix PlayerBucketEmptyEvent.  Fixes BUKKIT-2002 and BUKKIT-1997

Currently the PlayerBucketEmptyEvent is broken in 1.3.1 as the changes made in the NMS code caused the PlayerBucketEmptyEvent code to be implemented incorrectly.

The method ```this.a(world, d0, d1, d2, i, j, k)``` is responsible for actually placing the lava or water source block on the world. Previously the event was not called this ```a``` method was called, thus canceling the event would yield incorrect results - the player would keep the lava / water bucket, but the lava / water would still appear where they placed it. [BUKKIT-2002](https://bukkit.atlassian.net/browse/BUKKIT-2002)

In addition, the check for whether a player "can instantly build" (creative) was short circuiting before the event could be called, so the event would not be called for creative players (a feature that existed in 1.2.5). [BUKKIT-1997](https://bukkit.atlassian.net/browse/BUKKIT-1997)

This pull request fixes some potential game-breaking bugs, especially with regards to anti-griefing.