[Bleeding] Use player.getItemInHand(), instead of a new ItemStack. Addresses BUKKIT-767

This commit is contained in:
Feildmaster
2012-02-18 09:14:44 -06:00
committed by EvilSeph
parent 70c5f06425
commit d7f6d2d929
11 changed files with 12 additions and 21 deletions

View File

@@ -97,7 +97,7 @@ public class ItemDoor extends Item {
world.setTypeIdAndData(i, j, k, block.id, l);
// CraftBukkit start
if (entityhuman != null) {
BlockPlaceEvent event = CraftEventFactory.callBlockPlaceEvent(world, entityhuman, blockState, i, j, k, block);
BlockPlaceEvent event = CraftEventFactory.callBlockPlaceEvent(world, entityhuman, blockState, i, j, k);
if (event.isCancelled() || !event.canBuild()) {
event.getBlockPlaced().setTypeIdAndData(blockState.getTypeId(), blockState.getRawData(), false);