Bukkit/CraftBukkit — pull request #1281 by Black-Hole (2013-12-06 18:09:18+00:00)
Title: [C] Call BlockPlaceEvent for cocoa beans planted on log. Adds BUKKIT-5039

The Issue:
If you plant seed, potatoes and carrots, Bukkit fires a BlockPlaceEvent for the crops. No such event is fired for cocoa beans planted on jungle log.

Justification for this PR:
The behavior of cocoa should be the same as with all other plants. As of now, a plugin has to track the PlayerInteractEvent, check for jungle log, Material.DYE and the data value for cocoa beans, and calculate the resulting block location.

PR Breakdown:
The clicked x, y and z are saved at the beginning of the interactWith() method. Maybe some other extensions could use it, too.
This PR calls the ItemBlock.processBlockPlace(), which is a CraftBukkit method that calls the BlockPlaceEvent and returns the result (false if cancelled).

Testing Results and Materials:
Working as intended. Canceling the event cancels the placement, item count is not decreased.

Relevant PR:
(none)

JIRA Ticket:
BUKKIT-5039 - https://bukkit.atlassian.net/browse/BUKKIT-5039