summaryrefslogtreecommitdiffstats
path: root/nms-patches/ItemMinecart.patch
blob: 5e439ad0ac9a5c2b301fcd1d011c5449f46325e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
@@ -23,6 +23,13 @@
                 if (enumtrackposition.c()) {
                     d0 = 0.5D;
                 }
+                // CraftBukkit start - Minecarts
+                org.bukkit.event.player.PlayerInteractEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(entityhuman, org.bukkit.event.block.Action.RIGHT_CLICK_BLOCK, blockposition, enumdirection, itemstack);
+
+                if (event.isCancelled()) {
+                    return false;
+                }
+                // CraftBukkit end
 
                 EntityMinecartAbstract entityminecartabstract = EntityMinecartAbstract.a(world, (double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.0625D + d0, (double) blockposition.getZ() + 0.5D, this.b);