From 5a3813d7fe49a683eee4a9fdea1ad0725591eec5 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 4 Mar 2016 15:24:51 +1100 Subject: SPIGOT-1608: Add a way to get the hand used in PlayerInteract*Events --- nms-patches/ItemBoat.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nms-patches/ItemBoat.patch') diff --git a/nms-patches/ItemBoat.patch b/nms-patches/ItemBoat.patch index daeabd5e..410c84fd 100644 --- a/nms-patches/ItemBoat.patch +++ b/nms-patches/ItemBoat.patch @@ -5,7 +5,7 @@ return new InteractionResultWrapper(EnumInteractionResult.PASS, itemstack); } else { + // CraftBukkit start - Boat placement -+ org.bukkit.event.player.PlayerInteractEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(entityhuman, org.bukkit.event.block.Action.RIGHT_CLICK_BLOCK, movingobjectposition.a(), movingobjectposition.direction, itemstack); ++ org.bukkit.event.player.PlayerInteractEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(entityhuman, org.bukkit.event.block.Action.RIGHT_CLICK_BLOCK, movingobjectposition.a(), movingobjectposition.direction, itemstack, enumhand); + + if (event.isCancelled()) { + return new InteractionResultWrapper(EnumInteractionResult.PASS, itemstack); -- cgit v1.2.3