Bukkit/Bukkit — pull request #998 by me4502 (2014-01-03 03:19:59+00:00)
Title: [B+C] Add BlockCommandPreprocessEvent. Adds BUKKIT-3545

The Issue:

Currently it is not possible to preprocess CommandBlock commands, similar to how ServerCommandEvent and PlayerCommandPreprocessEvent work.

Justification for this PR:

This event allows for many things to be done with command blocks, such as plugins adding things similar to @p, etc. It also adds consistency between command types.

PR Breakdown:

This PR adds an event that occurs in the loop where commands are sent. This event is sent per command, as that seems to be easier for the developer. Plus this is more consistent. If cancelled, the command is no longer sent, but further commands from the same block will still be sent as long as their events aren't cancelled.

Testing Results and Materials:

This binary tests the event. It replaces @b, with the type id of the block below it.
https://dl.dropboxusercontent.com/u/20806998/BCPETest.jar

Relevant PR(s):

B-#### - https://github.com/Bukkit/Bukkit/pull/####
CB-#### - https://github.com/Bukkit/CraftBukkit/pull/####

JIRA Ticket:

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