mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-10 00:52:22 -07:00
[Bleeding] Use player.getItemInHand(), instead of a new ItemStack. Addresses BUKKIT-767
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user