Bukkit/CraftBukkit — pull request #1115 by Supertt007 (2013-03-31 19:05:48+00:00)
Title: [C] Physics shouldn't apply on BlockPlaceEvent. Fixes BUKKIT-3939

The Issue:

When cancelling a blockplaceevent, the block still gets notified and cause surrounding blocks to update. This bug can cause players to activate tnt near redstoneblocks or activate a bud switch even though they don't have permissions to place blocks

Justification for this PR:

The best example to test this is to build a bud switch and see if a player who doesn't have building rights is able to activate it or not.

PR Breakdown:

In the original code, there was 2 block updates. First on world.setTypeIdAndData(x, y, z, id, data, 3); and second on blockstate.update(true); I have cancelled both of them and added an extra block update after the block place event is handled.

Testing Results and Materials:

JIRA Ticket:

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