mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 04:02:50 +01:00
15 lines
835 B
Diff
15 lines
835 B
Diff
@@ -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();
|