SPIGOT-7380: Add PlayerInteractEvent#getClickedPosition and ChiseledBookshelf#getSlot

By: Jishuna <joshl5324@gmail.com>
This commit is contained in:
CraftBukkit/Spigot
2023-06-17 14:31:40 +10:00
parent b0576f313f
commit 20acc420d8
6 changed files with 66 additions and 6 deletions

View File

@@ -292,7 +292,7 @@
+ cancelledBlock = true;
+ }
+
+ PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(entityplayer, Action.RIGHT_CLICK_BLOCK, blockposition, movingobjectpositionblock.getDirection(), itemstack, cancelledBlock, enumhand);
+ PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(entityplayer, Action.RIGHT_CLICK_BLOCK, blockposition, movingobjectpositionblock.getDirection(), itemstack, cancelledBlock, enumhand, movingobjectpositionblock.getLocation());
+ firedInteract = true;
+ interactResult = event.useItemInHand() == Event.Result.DENY;
+ interactPosition = blockposition.immutable();