PaperMC/nms-patches/ItemBoat.patch
2014-11-28 11:23:19 +00:00

17 lines
1 KiB
Diff

--- ../work/decompile-8eb82bde//net/minecraft/server/ItemBoat.java 2014-11-28 11:22:56.038823161 +0000
+++ src/main/java/net/minecraft/server/ItemBoat.java 2014-11-28 11:01:54.000000000 +0000
@@ -53,6 +53,14 @@
} else {
if (movingobjectposition.type == EnumMovingObjectType.BLOCK) {
BlockPosition blockposition = movingobjectposition.a();
+
+ // 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, blockposition, movingobjectposition.direction, itemstack);
+
+ if (event.isCancelled()) {
+ return itemstack;
+ }
+ // CraftBukkit end
if (world.getType(blockposition).getBlock() == Blocks.SNOW_LAYER) {
blockposition = blockposition.down();