From 0474cc883317e1e48d37e146394621323b4f17e5 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Wed, 21 Jul 2021 09:32:54 +1000 Subject: [PATCH] SPIGOT-6369: Add ItemStack to HangingPlaceEvent By: DerFrZocker --- .../nms-patches/net/minecraft/world/item/ItemHanging.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-server/nms-patches/net/minecraft/world/item/ItemHanging.patch b/paper-server/nms-patches/net/minecraft/world/item/ItemHanging.patch index 8e55f444f..bf29dfed0 100644 --- a/paper-server/nms-patches/net/minecraft/world/item/ItemHanging.patch +++ b/paper-server/nms-patches/net/minecraft/world/item/ItemHanging.patch @@ -21,7 +21,7 @@ + org.bukkit.block.Block blockClicked = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()); + org.bukkit.block.BlockFace blockFace = org.bukkit.craftbukkit.block.CraftBlock.notchToBlockFace(enumdirection); + -+ HangingPlaceEvent event = new HangingPlaceEvent((org.bukkit.entity.Hanging) ((EntityHanging) object).getBukkitEntity(), who, blockClicked, blockFace); ++ HangingPlaceEvent event = new HangingPlaceEvent((org.bukkit.entity.Hanging) ((EntityHanging) object).getBukkitEntity(), who, blockClicked, blockFace, org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemstack)); + world.getCraftServer().getPluginManager().callEvent(event); + + if (event.isCancelled()) {