PaperMC/nms-patches/ItemBoat.patch
2015-03-04 09:48:58 +00:00

17 lines
1 KiB
Diff

--- /home/matt/mc-dev-private//net/minecraft/server/ItemBoat.java 2015-02-26 22:40:22.795608137 +0000
+++ src/main/java/net/minecraft/server/ItemBoat.java 2015-02-26 22:40:22.795608137 +0000
@@ -54,6 +54,14 @@
if (movingobjectposition.type == MovingObjectPosition.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();
}