Patrone.cc-src-skid-me/toothless/server/nms-patches/ItemBoat.patch
disclearing 4f52c57848 MEME ME :heart
FUCK PUTTYEXE
2019-06-19 04:50:21 +01:00

18 lines
938 B
Diff

--- a/net/minecraft/server/ItemBoat.java
+++ b/net/minecraft/server/ItemBoat.java
@@ -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();
}