mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 17:07:34 +01:00
Fix interact event call override (#9387)
This commit is contained in:
parent
206dd3af05
commit
aea9cdd37d
@ -30,7 +30,7 @@ index 6a5e3649d9843d85eceb0eae225200fa2551e844..1635fee928d64f4d2c336dca6675ed46
|
||||
this.interactResult = event.useItemInHand() == Event.Result.DENY;
|
||||
this.interactPosition = blockposition.immutable();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 9201e143ff520126c27a649bba62b359a01669c4..e813b58d724b9e5900df68f763ad0b59c84e47f4 100644
|
||||
index 9201e143ff520126c27a649bba62b359a01669c4..a4653a660e74f5d65489ddbb7b0e46134f2472c0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -512,7 +512,13 @@ public class CraftEventFactory {
|
||||
@ -40,7 +40,7 @@ index 9201e143ff520126c27a649bba62b359a01669c4..e813b58d724b9e5900df68f763ad0b59
|
||||
+
|
||||
+ // Paper start - cancelledItem param
|
||||
public static PlayerInteractEvent callPlayerInteractEvent(net.minecraft.world.entity.player.Player who, Action action, BlockPos position, Direction direction, ItemStack itemstack, boolean cancelledBlock, InteractionHand hand, Vec3 targetPos) {
|
||||
+ return CraftEventFactory.callPlayerInteractEvent(who, action, position, direction, itemstack, false, false, hand, null);
|
||||
+ return CraftEventFactory.callPlayerInteractEvent(who, action, position, direction, itemstack, cancelledBlock, false, hand, targetPos);
|
||||
+ }
|
||||
+ public static PlayerInteractEvent callPlayerInteractEvent(net.minecraft.world.entity.player.Player who, Action action, BlockPos position, Direction direction, ItemStack itemstack, boolean cancelledBlock, boolean cancelledItem, InteractionHand hand, Vec3 targetPos) {
|
||||
+ // Paper end - cancelledItem param
|
||||
|
Loading…
Reference in New Issue
Block a user