summaryrefslogtreecommitdiffstats
path: root/nms-patches/BlockIce.patch
blob: 6d0beefb88604b9f925bf6136165ee86e55afab2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- a/net/minecraft/server/BlockIce.java
+++ b/net/minecraft/server/BlockIce.java
@@ -51,6 +51,11 @@
     }
 
     protected void b(World world, BlockPosition blockposition) {
+        // CraftBukkit start
+        if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()), world.worldProvider.l() ? Blocks.AIR : Blocks.WATER).isCancelled()) {
+            return;
+        }
+        // CraftBukkit end
         if (world.worldProvider.l()) {
             world.setAir(blockposition);
         } else {