From 8ffa54ba8cc3f283cceac2b35c2beb965952a971 Mon Sep 17 00:00:00 2001 From: DerFrZocker Date: Wed, 21 Jul 2021 09:32:54 +1000 Subject: [PATCH] SPIGOT-6369: Add ItemStack to HangingPlaceEvent --- nms-patches/net/minecraft/world/item/ItemHanging.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nms-patches/net/minecraft/world/item/ItemHanging.patch b/nms-patches/net/minecraft/world/item/ItemHanging.patch index 8e55f444f..bf29dfed0 100644 --- a/nms-patches/net/minecraft/world/item/ItemHanging.patch +++ b/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()) {