Bukkit/Bukkit — pull request #1073 by GuyXY (2014-06-12 21:29:37+00:00)
Title: [B+C] Add FallingBlockDeathEvent. Fixes BUKKIT-4160 and BUKKIT-4402

The Issue:

The plugin developer were not able to check if a FallingBlock died.

Justification for this PR:

By accepting this PR plugin developer would be able to check if a FallingBlock died. This can be really useful if you want a certain thing to happen right after a FallingBlock gets destroyed.

PR Breakdown:

The PR does exactly what it sounds like. It'll make the EntityFallingBlock fire a FallingBlockDeathEvent right before it gets destroyed. You may even cancel its death.

Testing Results and Materials:

To test the new event I temporarily added a line that looked like this:

Bukkit.broadcastMessage("A block died :,(");

With this line added I compiled my modified CraftBukkit version, placed a sand block in the air and checked if the message appeared after the block lands. It did.

Relevant PR(s):

Unfortunately I can't link the second change I'm going to make. At least I have no idea how to link it without its PR existing yet... BUT I will link THIS PR in my second PR.

JIRA Ticket:

BUKKIT-4402 - https://bukkit.atlassian.net/browse/BUKKIT-4402
BUKKIT-4160 - https://bukkit.atlassian.net/browse/BUKKIT-4160